[ create a new paste ] login | about

polux

Name:
Email:
Site/Blog:
Location:
Default language:
Favorite languages:
About:

Saved pastes by polux:

Haskell, pasted on Jul 31:
1
2
3
4
5
parse :: String -> Either Double (Double -> Double -> Double)
parse s = maybe (Left $ read s) Right (lookup s ops)
  where ops = zip ["+","-","*","/"] [(+),(-),(*),(/)]

go :: [Double] -> [String] -> [Double]
...
view (15 lines)