Hacker News new | past | comments | ask | show | jobs | submit login

(&) :: Picture -> Picture -> Picture

Can someone explain this line?




It's a type declaration saying that the & operator takes two Picture as arguments and returns a picture.

So, if "a" and "b" are pictures "a & b" is typechecking.

To be more precise, if you account for currying, it says that the & operator takes a Picture and returns a Picture -> Picture function. This function can then be applied to a Picture to yield a Picture. It's as I explained above but with an intermediate step.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: