Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
knughit
on Feb 26, 2016
|
parent
|
context
|
favorite
| on:
The Lisp Curse (2011)
Welcome to Haskell, where anything can be infix :-)
greydius
on Feb 26, 2016
[–]
That can be nice in a lot of situations. e.g.
(+) 4 2 vs. (+) <$> Just 4 <*> Just 2
I usually prefer the applicative style above to
liftA2 (+) (Just 4) (Just 2)
because it preserves the "form" of the original expression and generalizes to more arguments. ie. it doesn't require liftAn for whatever n number of arguments my function takes.
Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: