is there a way where a construct like (pseudo code):
test (a,b) = if a > 10 then a else null
in Haskell. If you map over a list I can use filter to do this, but I would like a similar construct using if then else.
filter
if then else
Aucun commentaire:
Enregistrer un commentaire