Anonymous user
Twelve statements: Difference between revisions
→{{header|Haskell}}: using unicode operators. Might not be a terribly smart thing to do, those who know haskell, feel free to change it
(→{{header|Haskell}}: using unicode operators. Might not be a terribly smart thing to do, those who know haskell, feel free to change it) |
|||
Line 25:
tf (x:xs) = map (True:) s ++ map (False:) s where s = tf xs
sumbool =
wrongness b = sumbool . zipWith (/=) b . map (\f -> f b)
statements = [ (==12) . length,
] where
(⊂) s x = \b -> s == (sumbool . map (b!!) . takeWhile (< length b)) x
main = let t n s = filter ((==n).fst) [(wrongness b s, b) | b <- tf s] in do
Line 64:
(1,[False,False,False,True,False,False,False,True,False,True,True,True])
</pre>
=={{header|Perl 6}}==
<lang perl6>sub infix:<→> ($protasis,$apodosis) { !$protasis or $apodosis }
|