関数型プログラミング言語Haskell Part30at TECH
関数型プログラミング言語Haskell Part30 - 暇つぶし2ch15:デフォルトの名無しさん
17/01/17 01:19:14.78 +KcFvgyU.net
if arr !! index > box1 then
solve arr (index + 1) (arr !! index, box2)
else
の部分では、box1>box2 なのでどちらの分岐も考えられる
出力の型をBoolに変更し
if arr !! index > box1 then
solve arr (index + 1) (arr !! index, box2) || solve arr (index + 1) (arr !! index, box2)
else
でどうでしょう。で後からTrue,FalseをYES,NOに変えればOK 👀
Rock54: Caution(BBR-MD5:0be15ced7fbdb9fdb4d0ce1929c1b82f)



次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch