You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would play nicely with the idea of "soft-typing" (i.e. world's laziest type checker):
User={db=[{id: 1,name"Matz"},{id: 2,name"Matheus"}]# The ! here means it may fail
find! =fn{ |id|
List.each(db,fn{ |user|
ifuser.id == id{returnuser;}});returnnone;# or return error("msg")}}User.find!(3)or{{id: 0,name"Dummy user"}}
The text was updated successfully, but these errors were encountered:
V's error handling seems to be a good fit here.
This would play nicely with the idea of "soft-typing" (i.e. world's laziest type checker):
The text was updated successfully, but these errors were encountered: