News for hackers. Stuff that matters.
Re:Swift and the Legacy of Functional Programming by wyager on Monday November 21, 2016 @02:00PM (#13008083)
Huh? No, anyone who writes it in Haskell would not use those lambda abstractions. You would just use "filter isValid (map Person names)".
Re:Swift and the Legacy of Functional Programming by Scriptor on Monday November 21, 2016 @02:05PM (#13008135)
I'm assuming Person is a record constructor, is isValid here a field in that record or another function?
Re:Swift and the Legacy of Functional Programming by prodigal_erik on Monday November 21, 2016 @02:11PM (#13008202)
Haskell doesn't distinguish the two. If you define Person with named fields including isValid, you automatically get a function named isValid that returns that field, or you can write your own isValid function that examines the whole Person.