Show
Ignore:
Timestamp:
10/08/08 07:34:08 (3 months ago)
Author:
mokehehe
Message:

キー入力処理変更
Sキーでスクリーンショットを取れるように

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/haskell/nario/Util.hs

    r20925 r20943  
    88 
    99-- けつの n 個取り出し 
    10 lastN n xs = loop n [] xs 
     10lastN n xs = supply n [] xs 
    1111        where 
    12                 loop _ acc [] = acc 
    13                 loop 0 acc (x:xs) = loop 0 (tail acc ++ [x]) xs 
    14                 loop n acc (x:xs) = loop (n-1) (acc ++ [x]) xs 
     12                supply _ acc [] = acc 
     13                supply 0 acc xs = queue acc xs 
     14                supply n acc (x:xs) = supply (n-1) (acc ++ [x]) xs 
     15                queue acc [] = acc 
     16                queue acc (x:xs) = queue (tail acc ++ [x]) xs 
    1517 
    1618-- 数値の符号を返す