diff options
author | Camil Staps | 2016-11-07 22:36:40 +0000 |
---|---|---|
committer | Camil Staps | 2016-11-07 22:36:40 +0000 |
commit | 4e074b282a8236dcc3599f76ce85d7e52a24d408 (patch) | |
tree | e45d3c8c530ed796ea4d31185837f433f73db247 /invperm.icl | |
parent | Update gitignore (diff) |
Adapted more examples to be standalone
Diffstat (limited to 'invperm.icl')
-rw-r--r-- | invperm.icl | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/invperm.icl b/invperm.icl index 5494aa6..4c36b6c 100644 --- a/invperm.icl +++ b/invperm.icl @@ -11,7 +11,17 @@ behavior is however quadratic (in the size of the permutation). Run the program with the Show Constructors option on (Application options) */ -import StdInt, StdMisc +(<) infix 4 :: !Int !Int -> Bool +(<) a b = code inline { + ltI +} + +(+) infixl 6 :: !Int !Int -> Int +(+) a b = code inline { + addI +} + +//import StdInt, StdMisc /* A permutation (Perm) is represented as a list of integers. The resulting inverse permutation (TPerm) is built up as a list of |