From beb27552892f87fa8f9e21812945c045ded7ae79 Mon Sep 17 00:00:00 2001 From: Felix Chapman Date: Fri, 17 Apr 2015 21:04:06 +0100 Subject: [PATCH] Improve definitions of functions 'and' and 'or' --- modules/lib.star | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/lib.star b/modules/lib.star index 2c78f2e..737de09 100644 --- a/modules/lib.star +++ b/modules/lib.star @@ -5,8 +5,8 @@ let # basic logic not = x -> if x then False else True, -or = x y -> if x then True else if y then True else False, -and = x y -> if x then (if y then True else False) else False, +or = x y -> if x then True else y, +and = x y -> if x then y else False, any = foldr (or) False, all = foldr (and) True,