We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Namely, when you try to update a filed using the previous (current) state with a given function f, just write x{it $= f}.
f
x{it $= f}
The text was updated successfully, but these errors were encountered:
I don't understand what you mean, can you give a more detailed example?
Sorry, something went wrong.
newtype Rec = MkRec {unRec :: a} val :: Rec unRec val :: a
Hence, val{unRec = f $ unRec val} ≡ val{unRec $= f}.
val{unRec = f $ unRec val}
val{unRec $= f}
@DotPat notice that record in Hamler is just a kind of map, it comes from Purescript's row polymorphism
and when u define
newtype Rec = MkRec {unRec :: a}
unRec :: Rec -> a is not defined
unRec :: Rec -> a
still, your suggestion is great!!! thx a lot
No branches or pull requests
Namely, when you try to update a filed using the previous (current) state with a given function
f
, just writex{it $= f}
.The text was updated successfully, but these errors were encountered: