|
|
Log in / Subscribe / Register

An introduction to the Julia language, part 2

An introduction to the Julia language, part 2

Posted Sep 5, 2018 12:08 UTC (Wed) by bpearlmutter (subscriber, #14693)
In reply to: An introduction to the Julia language, part 2 by rsidd
Parent article: An introduction to the Julia language, part 2

In Haskell, >>= goes the other way.


to post comments

An introduction to the Julia language, part 2

Posted Sep 17, 2018 15:04 UTC (Mon) by nybble41 (subscriber, #55106) [Link]

A closer parallel for right-to-left function composition would be (>>>) from Control.Category rather than monadic bind (>>=):

(f >>> g >>> h) x == h (g (f x))

However, this is not quite the same as the Julia code, which was using flipped function application (Haskell: Data.Function.&), not composition:

f x & g & h == h (g (f x))

The Julia |> operator matches the syntax for flipped function application in F#.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds