Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Extended examples in Main

  • Loading branch information...
commit ed3dacec31feaea90799976dbc2a0dc6c1597371 1 parent 66bbcba
Tom Lokhorst authored September 01, 2009

Showing 1 changed file with 15 additions and 6 deletions. Show diff stats Hide diff stats

  1. 21  src/Main.hs
21  src/Main.hs
@@ -15,27 +15,36 @@ import qualified Prelude as P
15 15
 
16 16
 -- Switch between these two types and run `test` to see the AwesomePrelude in action!
17 17
 
18  
-f :: Js JsBool -> Js JsBool
19  
---f :: P.Bool -> P.Bool
20  
-f x = not x && false || true
  18
+fb :: Js JsBool -> Js JsBool
  19
+--fb :: P.Bool -> P.Bool
  20
+fb x = not x && false || true
21 21
 
22  
-test = f true
  22
+test = fb false
23 23
 
24 24
 
25 25
 
  26
+--fEq :: Js JsBool -> Js JsBool
  27
+fEq :: P.Bool -> P.Bool
  28
+fEq x = x == not x
26 29
 
  30
+test2 = fEq true
27 31
 
28 32
 
29 33
 
  34
+--fNumEq :: Js JsNumber -> Js JsNumber -> Js JsBool
  35
+fNumEq :: P.Int -> P.Int -> P.Bool
  36
+fNumEq x y = x == y
30 37
 
  38
+test3 = fNumEq 3 4
31 39
 
32 40
 
33 41
 
34 42
 
35 43
 
36 44
 
37  
--- listy :: [Int]
38  
--- listy = 3 `cons` (4 `cons` nil)
  45
+
  46
+listy :: [Int]
  47
+listy = 3 `cons` (4 `cons` nil)
39 48
 
40 49
 -- bool' :: a -> a -> P.Bool -> a
41 50
 -- bool' x y b = if b then x else y

0 notes on commit ed3dace

Please sign in to comment.
Something went wrong with that request. Please try again.