Drkcore

19 01 2010 Haskell Tweet

平均値順にソート(Haskell)

mixiの課題丸投げ

import Data.List (sortBy,sort)
import Data.Ord (comparing)

meansort xs = sortBy (comparing (abs . ((average xs)-))) (sort xs)
    where
      average xs = sum xs `div` (length xs)

About

  • もう5年目(wishlistありマス♡)
  • 最近はPythonとDeepLearning
  • 日本酒自粛中
  • ドラムンベースからミニマルまで
  • ポケモンGOゆるめ

Tag

Python Deep Learning javascript chemoinformatics Emacs sake and more...

Ad

© kzfm 2003-2021