diff options
author | Dmitrii Kuznetsov <torgeek@users.noreply.github.com> | 2021-02-22 18:36:35 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-22 18:36:35 +0300 |
commit | bc8bd2646f068cfb402850f7c0f9b1dbfe81e5a0 (patch) | |
tree | 89213fd6afbf9cc9303c1c2fa08dafc840a9d99d /purescript.html.markdown | |
parent | 363d5281f1e3d5bee6339b5316405b0a4b592c49 (diff) | |
parent | 110511a10110f96b20f107c078f7d5ef4c01b109 (diff) |
Merge pull request #1 from adambard/master
Merge from original adambard
Diffstat (limited to 'purescript.html.markdown')
-rw-r--r-- | purescript.html.markdown | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/purescript.html.markdown b/purescript.html.markdown index b413a9e3..6b74ac64 100644 --- a/purescript.html.markdown +++ b/purescript.html.markdown @@ -1,5 +1,6 @@ --- language: purescript +filename: purescript.purs contributors: - ["Fredrik Dyrkell", "http://www.lexicallyscoped.com"] - ["Thimoteus", "https://github.com/Thimoteus"] @@ -65,12 +66,13 @@ true && (9 >= 19 || 1 < 2) -- true """Hello world""" -- "Hello\nworld" -- Concatenate -"such " ++ "amaze" -- "such amaze" +"such " <> "amaze" -- "such amaze" -- -- 2. Arrays are Javascript arrays, but must be homogeneous -[1,1,2,3,5,8] :: Array Number -- [1,1,2,3,5,8] +[1,1,2,3,5,8] :: Array Int -- [1,1,2,3,5,8] +[1.2,2.0,3.14] :: Array Number -- [1.2,2.0,3.14] [true, true, false] :: Array Boolean -- [true,true,false] -- [1,2, true, "false"] won't work -- `Cannot unify Prim.Int with Prim.Boolean` @@ -85,7 +87,7 @@ head [1,2,3] -- Just (1) tail [3,2,1] -- Just ([2,1]) init [1,2,3] -- Just ([1,2]) last [3,2,1] -- Just (1) --- Random access - indexing +-- Array access - indexing [3,4,5,6,7] !! 2 -- Just (5) -- Range 1..5 -- [1,2,3,4,5] |