diff options
-rw-r--r-- | frontend/utilities.dcl | 2 | ||||
-rw-r--r-- | frontend/utilities.icl | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/frontend/utilities.dcl b/frontend/utilities.dcl index a7a58d5..2315a73 100644 --- a/frontend/utilities.dcl +++ b/frontend/utilities.dcl @@ -21,6 +21,8 @@ isSpecialChar :: ! Char -> Bool For Lists */ +isNotEmpty :: ![a] -> Bool + mapSt :: !(.a -> (.st -> (.c,.st))) ![.a] !.st -> (![.c],!.st) app2St :: !(!.(.a -> .(.st -> (.c,.st))),!.(.e -> .(.st -> (.f,.st)))) !(.a,.e) !.st -> (!(.c,.f),!.st) diff --git a/frontend/utilities.icl b/frontend/utilities.icl index e844395..9c943fd 100644 --- a/frontend/utilities.icl +++ b/frontend/utilities.icl @@ -74,6 +74,10 @@ isSpecialChar ':' = True isSpecialChar '.' = True isSpecialChar c = False +isNotEmpty :: ![a] -> Bool +isNotEmpty [] = False +isNotEmpty _ = True + strictMap :: !(.a -> .b) ![.a] -> [.b] strictMap f [x : xs] #! head = f x |