Commit 9a007500 authored by Pieter Koopman's avatar Pieter Koopman
Browse files

function isNotEmpty added

parent e864f4db
...@@ -21,6 +21,8 @@ isSpecialChar :: ! Char -> Bool ...@@ -21,6 +21,8 @@ isSpecialChar :: ! Char -> Bool
For Lists For Lists
*/ */
isNotEmpty :: ![a] -> Bool
mapSt :: !(.a -> (.st -> (.c,.st))) ![.a] !.st -> (![.c],!.st) mapSt :: !(.a -> (.st -> (.c,.st))) ![.a] !.st -> (![.c],!.st)
app2St :: !(!.(.a -> .(.st -> (.c,.st))),!.(.e -> .(.st -> (.f,.st)))) !(.a,.e) !.st -> (!(.c,.f),!.st) app2St :: !(!.(.a -> .(.st -> (.c,.st))),!.(.e -> .(.st -> (.f,.st)))) !(.a,.e) !.st -> (!(.c,.f),!.st)
......
...@@ -74,6 +74,10 @@ isSpecialChar ':' = True ...@@ -74,6 +74,10 @@ isSpecialChar ':' = True
isSpecialChar '.' = True isSpecialChar '.' = True
isSpecialChar c = False isSpecialChar c = False
isNotEmpty :: ![a] -> Bool
isNotEmpty [] = False
isNotEmpty _ = True
strictMap :: !(.a -> .b) ![.a] -> [.b] strictMap :: !(.a -> .b) ![.a] -> [.b]
strictMap f [x : xs] strictMap f [x : xs]
#! head = f x #! head = f x
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment