I have got this seemingly trivial parallel quicksort implementation, the code is as follows: import System.Random import Control.Parallel import Data.List quicksort :: Ord a => [a] -> [a] quicksort xs = pQuicksort 16 xs -- 16 is the number of sparks used to sort -- pQuicksort, parallelQuicksort -- As long as n > 0 evaluates the lower and upper part of the list in parallel, -- when we have recursed
Using a number of newer language features in Scala it's possible to implement a composable component system and create components using the so called Cake Pattern, described by Martin Odersky in the paper Scalable Component Abstractions and also in a recent talk. Several of the Scala features used in the Cake Pattern have corresponding Haskell features. For example, Scala implicits correspond to H
Trying to learn how to program monads in Scala, got some troubles Given the quick code sample import Control.Monad newtype LJ a = LJ { session :: a } instance Monad LJ where return s = LJ s (>>=) m f = f ( session m ) instance Functor LJ where fmap f m = LJ . f $ session m type SimpleLJ = LJ String auth :: String -> String -> SimpleLJ auth = undefined readFeed :: String -> SimpleLJ readFeed = unde
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く