Gen (Maybe Int)
を に変換したいMaybe Int
。1 から 9 までのランダムな Just Int を生成する関数があります。セル関数を使用したいのですが、その型シグネチャを変更できません。助言がありますか?
cell :: Gen (Maybe Int)
cell = frequency
[(9, return Nothing),
(1, do n <- choose (1,9)
return (Just n))]