Jump to content

Monads/List monad: Difference between revisions

Added uBasic/4tH version
(Monads/List monad en FreeBASIC)
(Added uBasic/4tH version)
Line 1,034:
[3,4,5].bind_comp(listy_doub, listy_inc) #=> [8, 10, 12]
</lang>
 
=={{header|uBasic/4tH}}==
{{trans|Ring}}
<lang>s := "[" : Push 5, 4, 3
 
Do While Used ()
y = Set (x, Pop ()) + 1
s = Join (s, Str (Set (z, y * 2)), ", " )
Loop
 
Print Show (Set (s, Join (Clip (s, 2), "]")))
</lang>
{{out}}
<pre>
[8, 10, 12]
 
0 OK, 0:138
</pre>
 
=={{header|Wren}}==
374

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.