From 4e074b282a8236dcc3599f76ce85d7e52a24d408 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Mon, 7 Nov 2016 22:36:40 +0000 Subject: Adapted more examples to be standalone --- invperm.icl | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'invperm.icl') 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 -- cgit v1.2.3