Append numbers at same position in strings: Difference between revisions
Content added Content deleted
(add OCaml) |
(→{{header|Haskell}}: Added a Haskell version) |
||
Line 304: | Line 304: | ||
[11019 21120 31221 41322 51423 61524 71625 81726 91827] |
[11019 21120 31221 41322 51423 61524 71625 81726 91827] |
||
</pre> |
</pre> |
||
=={{header|Haskell}}== |
|||
<syntaxhighlight lang="haskell">main :: IO () |
|||
main = |
|||
mapM_ putStrLn $ |
|||
zipWith3 |
|||
(\ x y z -> [x, y, z] >>= show) |
|||
[1, 2, 3, 4, 5, 6, 7, 8, 9] |
|||
[10, 11, 12, 13, 14, 15, 16, 17, 18] |
|||
[19, 20, 21, 22, 23, 24, 25, 26, 27]</syntaxhighlight> |
|||
{{Out}} |
|||
<pre>11019 |
|||
21120 |
|||
31221 |
|||
41322 |
|||
51423 |
|||
61524 |
|||
71625 |
|||
81726 |
|||
91827</pre> |
|||
=={{header|jq}}== |
=={{header|jq}}== |