diff options
Diffstat (limited to 'src/boot')
-rw-r--r-- | src/boot/utility.boot | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/boot/utility.boot b/src/boot/utility.boot index cdc6d05d..839e9b1a 100644 --- a/src/boot/utility.boot +++ b/src/boot/utility.boot @@ -1,4 +1,4 @@ --- Copyright (C) 2012, Gabriel Dos Reis. +-- Copyright (C) 2012-2013, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -48,6 +48,7 @@ module utility (objectMember?, symbolMember?, stringMember?, lastNode, append, append!, copyList, substitute, substitute!, setDifference, setUnion, setIntersection, symbolAssoc, applySubst, applySubst!, applySubstNQ, objectAssoc, + invertSubst, remove, removeSymbol, atomic?, every?, any?, take, takeWhile, drop, copyTree, finishLine, stringPrefix?, stringSuffix?, findChar, charPosition) where @@ -281,6 +282,9 @@ applySubstNQ(sl,t) == symbol? t and (p := symbolAssoc(t,sl)) => rest p t +invertSubst sl == + [[rest x,:first x] for x in sl] + --% set operations setDifference(x,y) == |