2017-12-24から1日間の記事一覧

Haskellで100マス計算を解いてみた

Haskellでの100マス計算を以下のように実装しました。 module Try.Hyakumasu where data MathData = MathData {col :: [Int], row :: [Int]} deriving (Show, Eq) hyakumasu :: (Int -> Int -> Int) -> MathData -> [[Int]] hyakumasu f x = [f c <$> (col x…