lama_byterun/regression/test060.expr

20 lines
307 B
Text
Raw Normal View History

fun f (l) {
infix "===" at "==" (a, b) {
return a == b
}
case l of
{} -> return 1
| {_} -> return 1
| a : b : tl -> return a === b && f (b : tl)
esac
}
2019-10-16 01:13:52 +03:00
local x = read ();
write (f ({}));
write (f ({1}));
write (f ({1, 1}));
write (f ({1, 1, 1}));
write (f ({1, 2, 1}))