随笔分类 -  04.Functional Prog

Haskell
摘要:摘自{-逆波兰式(revese polish notation, RPN): 操作符出现在操作数的后面,而不是夹在它们中间. 如我们使用 "4 3 +" 而不是 "4 + 3".-}solveRPN :: String -> DoublesolveRPN = head . foldl folding... 阅读全文
posted @ 2015-05-15 22:49 庚武 阅读(275) 评论(0) 推荐(0) 编辑
摘要:doubleMe x = x + xdoubleUs x y = doubleMe x + doubleMe ydoubleSmallNumber x = if x>100 then x else x * 2 doubleSmallNumber' x =... 阅读全文
posted @ 2015-05-12 18:22 庚武 阅读(669) 评论(0) 推荐(0) 编辑
摘要:i :: Inti = 5--add, sub :: Int -> Int -> Intadd, sub :: (Num a) => a -> a -> aadd a b = a + bsub a b = a - bf :: (Num a) => a -> af x = 4 * x + 1--出错-... 阅读全文
posted @ 2014-10-11 16:17 庚武 阅读(480) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2014-10-10 13:53 庚武 阅读(1) 评论(0) 推荐(0) 编辑
摘要:from:http://www.haskell.org/haskellwiki/Haskell_in_5_steps#Write_your_first_parallel_Haskell_program起由: Write your first parallel Haskell programHaskell has good support for parallel and multicore programming. We can write a parallel program by adding `par` to expressions, like so:import Control.Par 阅读全文
posted @ 2011-10-20 15:10 庚武 阅读(2142) 评论(1) 推荐(0) 编辑
摘要:Leksah Editor: http://leksah.org/download.html/*******************************************************************************/http://eclipsefp.github.com/Install:http://eclipsefp.github.com/install.htmlhttp://www.haskell.org/haskellwiki/Learn_Haskell_in_10_minutesAbout This ProjectEGit is an Eclips 阅读全文
posted @ 2011-10-20 13:59 庚武 阅读(363) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示