Commits

Anonymous committed 2c1ca38

[svn r517] ok

  • Participants
  • Parent commits 4ba3d58

Comments (0)

Files changed (1)

 }
 
 
+function map? {
+	local __f=$(__make_lambda 1 "$1")
+
+	while read __a ; do
+		eval "__lambda1=\"$__a\" ; $__f >/dev/null"
+		if [[ "$?" = "0" ]]  ;then
+			echo "/bin/true"
+		else
+			echo "/bin/false"
+		fi
+	done
+}
+
+
 # Filters the input according to the given predicate.
 # filter :: (a -> Bool) -> [a] -> [a]
 function filter {
 	local __acc="$2"
 
 	while read __a ; do
-		eval "__lambda1=\"$__a\" ; __lambda2=\"eval (exit $__acc)\" ; $__f"
+		eval "__lambda1=\"$__a\" ; __lambda2=\"eval (exit $__acc)\" ; $__f >/dev/null"
 		__acc="$?"
 	done
 	return "$__acc"
 	local __acc="$2"
 
 	while read __a ; do
-		__acc=$(eval "__lambda2=\"eval (exit $__acc)\" ; __lambda1=\"$__acc\" ; $__f")
+		__acc=$(eval "__lambda2=\"eval (exit $__acc)\" ; __lambda1=\"$__acc\" ; $__f >/dev/null")
 	done
 	return "$__acc"
 }