Non-recursive binding allows me to shadow bound value, for instance:
b a = let norec a = a + 10 in a
here let norec
created by myself means a let
binding but not recursive.
This is extremely helpful when using record wildcards:
data MyRecord = MyRecord{ {- vary huuuuuge set of definitions -} }
foo MyRecord{..} = let norec field1 = field1 + 1
field2 = modify field2
{- some other modifications to the fields -}
in MyRecord{..}
Is that achievable? Or how do you deal with it in your cases?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…