You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-- we restrict the domain of n to [1,20) so that the result remains computable
-- tests that all elements of lists are derangements of each other
isEveryElementDerangementTest :: Int -> Bool
isEveryElementDerangementTest n = apply' (n <= 1 && n > 10) (-->) (and (map (isDerangement [0..n-1]) (deran n)))
--tests if every element generated by 'deran' is a permutation of original
isEveryElementPermutationTest :: Int -> Bool
isEveryElementPermutationTest n = apply' (n <= 1 && n > 10) (-->) (and (map (isPermutation' [0..n-1]) (deran n)))
must become
-- we restrict the domain of n to [1,20) so that the result remains computable
-- tests that all elements of lists are derangements of each other
isEveryElementDerangementTest :: Int -> Bool
isEveryElementDerangementTest n = apply' (n >=1 && n <10) (-->) (and (map (isDerangement [0..n-1]) (deran n)))
--tests if every element generated by 'deran' is a permutation of original
isEveryElementPermutationTest :: Int -> Bool
isEveryElementPermutationTest n = apply' (n >= 1 && n < 10) (-->) (and (map (isPermutation' [0..n-1]) (deran n)))
Ex. 6
--checks if latin alphabet character will be encoded via rot13
rot13EncodedPropertyChar :: Char -> Bool
rot13EncodedPropertyChar x = (x `elem` rot13EncodableAlphabet) --> ((head $ rot13 [x]) /= x)
wrong implementation of the requirement.
The text was updated successfully, but these errors were encountered:
Ex. 5
must become
Ex. 6
wrong implementation of the requirement.
The text was updated successfully, but these errors were encountered: