Y
Hacker News
new
|
ask
|
show
|
jobs
by
wyager
3499 days ago
Huh? No, anyone who writes it in Haskell would not use those lambda abstractions. You would just use "filter isValid (map Person names)".
1 comments
Scriptor
3499 days ago
I'm assuming Person is a record constructor, is isValid here a field in that record or another function?
link
prodigal_erik
3499 days ago
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.
link