mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-24 15:51:41 +03:00
parent
6cfd618df3
commit
2d1461d27f
@ -71,7 +71,8 @@ world""" -- "Hello\nworld"
|
|||||||
--
|
--
|
||||||
-- 2. Arrays are Javascript arrays, but must be homogeneous
|
-- 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]
|
[true, true, false] :: Array Boolean -- [true,true,false]
|
||||||
-- [1,2, true, "false"] won't work
|
-- [1,2, true, "false"] won't work
|
||||||
-- `Cannot unify Prim.Int with Prim.Boolean`
|
-- `Cannot unify Prim.Int with Prim.Boolean`
|
||||||
|
Loading…
Reference in New Issue
Block a user