Monads/List monad: Difference between revisions

m
Line 355:
 
=={{header|Julia}}==
Julia uses the function bind for binding a channel to a task, but this can be imported and overloaded.
The |> syntax in Julia can also be used to chain functions taking one argument.
<lang julia>julia> unit(v) = [v...]
unit (generic function with 1 method)
Line 371 ⟶ 372:
 
julia> bind(bind(unit([2, 3, 4]), f1), f2)
3-element Array{Int64,1}:
6
8
10
 
julia> unit([2, 3, 4]) .|> f1 .|> f2
3-element Array{Int64,1}:
6
4,105

edits