git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Add (:) to prelude
commit841be3cc29339348fb067a837d2190770e912b00 authorGary Burgess <gary.burgess@gmail.com> dateFri 11 Apr 2014, 20:00 (13 years ago) parent9e9d1f5
1 file changed+12
prelude/prelude.purs+12
prelude/prelude.purs+12
@@ -38,6 +38,18 @@ module Prelude where
3838
3939 (#) :: forall a b. a -> (a -> b) -> b
4040 (#) x f = f x
41+
42+ infixr 6 :
43+
44+ (:) :: forall a. a -> [a] -> [a]
45+ (:) = cons
46+
47+ foreign import cons
48+ "function cons(e) {\
49+ \ return function (l) {\
50+ \ return [e].concat(l);\
51+ \ };\
52+ \}" :: forall a. a -> [a] -> [a]
4153
4254 class Show a where
4355 show :: a -> String