From c6ddd19ecefb9bcab85f01464d16f3a383f5bb2f Mon Sep 17 00:00:00 2001 From: zweije Date: Tue, 14 Aug 2001 15:48:18 +0000 Subject: This commit was generated by cvs2svn to compensate for changes in r644, which included commits to RCS files with non-trunk default branches. git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@645 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d --- sucl/basic.dcl | 3 +++ sucl/basic.icl | 3 +++ 2 files changed, 6 insertions(+) (limited to 'sucl') diff --git a/sucl/basic.dcl b/sucl/basic.dcl index c0d1de8..0f2118f 100644 --- a/sucl/basic.dcl +++ b/sucl/basic.dcl @@ -118,6 +118,9 @@ mappair :: .(.a -> .b) .(.c -> .d) !(.a,.c) -> (.b,.d) // Map a function onto the second element of a 2-tuple. mapsnd :: v:(.a -> .b) -> u:((.c,.a) -> (.c,.b)), [u <= v] +// Map a function on the second element of a triple. +mapsnd3 :: v:(.a -> .b) -> u:((.c,.a,.d) -> (.c,.b,.d)), [u <= v] + // Map a function onto the tail of a list. maptl :: .(x:[.a] -> u:[.a]) !w:[.a] -> v:[.a], [u <= v, w <= x] diff --git a/sucl/basic.icl b/sucl/basic.icl index 425f29f..a8bfcdf 100644 --- a/sucl/basic.icl +++ b/sucl/basic.icl @@ -198,6 +198,9 @@ mappair f g (x,y) = (f x,g y) mapsnd :: v:(.a -> .b) -> u:((.c,.a) -> (.c,.b)), [u <= v] mapsnd f = app2 (id,f) +mapsnd3 :: v:(.a -> .b) -> u:((.c,.a,.d) -> (.c,.b,.d)), [u <= v] +mapsnd3 f = app3 (id,f,id) + maptl :: .(x:[.a] -> u:[.a]) !w:[.a] -> v:[.a], [u <= v, w <= x] maptl f [] = [] maptl f [x:xs] = [x:f xs] -- cgit v1.2.3