Skip to content

Commit

Permalink
Add question-mark forms for predicate functions
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewschleifer committed Feb 16, 2011
1 parent 60a4210 commit 70167cd
Showing 1 changed file with 27 additions and 3 deletions.
30 changes: 27 additions & 3 deletions nu/nu.nu
Expand Up @@ -34,13 +34,37 @@
(let ((r (NuMath random)))
(* maximum (- (/ r maximum) ((/ r maximum) intValue))))))

(global atom?
(do (x)
(x atom)))

(global char?
(do (x)
(eq (x class) ('a' class))))

(global atom?
(do (x)
(x atom)))
(global eq?
(do (x y)
(eq x y)))

(global ge?
(do (x y)
(ge x y)))

(global gt?
(do (x y)
(gt x y)))

(global le?
(do (x y)
(le x y)))

(global lt?
(do (x y)
(lt x y)))

(global ne?
(do (x y)
(ne x y)))

(global number?
(do (x)
Expand Down

0 comments on commit 70167cd

Please sign in to comment.