never executed always true always false
1 module AoC.Utils 2 ( (~~) 3 ) where 4 5 -- |Messing around with a custom operator for ranges that can handle both up-to 6 -- and down-to. 7 infixl 5 ~~ 8 (~~) :: Int -> Int -> [Int] 9 a ~~ b | a <= b = [a .. b] 10 | otherwise = reverse $ b ~~ a