原创-Haskell
文章平均质量分 64
BalterNotz
使用C做过NC代码词法分析
J2EE项目 WEB 前后端
Linux Shell 脚本 Python
Haskell 等
展开
-
在ghci里面使用let定义函数,并且对函数加上类型声明
10:13:05BalterNotz 2016/9/13 10:13:05我记得,是寒东,还是大魔头,对我说过,在ghci里面,可以用let func :: a -> b -> c = (\a b ->.....) 这样,加上类型的声明的?BalterNotz 2016/9/13 10:13:11是怎样写的??东风谷草 2016/9/13 10:13:21l原创 2016-09-13 10:22:20 · 1145 阅读 · 0 评论 -
Haskell map
source: https://www.hackerrank.com/challenges/30-dictionaries-and-maps-- Enter your code here. Read input from STDIN. Print output to STDOUTmodule Main whereimport qualified Data.Map as Ma原创 2016-09-14 00:37:15 · 1859 阅读 · 0 评论 -
使用Haskell计算一个正整数二进制表示中最大的连续的1的个数
source: https://www.hackerrank.com/challenges/30-binary-numbersmodule Main wherecountMine :: Int -> Int -> IntcountMine c n | n == 0 = c | otherwise = let tup = count1 0 n原创 2016-09-15 16:26:39 · 613 阅读 · 0 评论 -
Day 11: 2D Arrays
source: https://www.hackerrank.com/challenges/30-2d-arraysmodule Main wheremake2DIndex2 :: Int -> Int -> Int -> Int -> Int -> Int -> [(Int, Int)]make2DIndex2 i j m' n' m n | i + m'原创 2016-09-16 19:54:45 · 359 阅读 · 0 评论 -
求最大子序列和 - Haskell
-- Enter your code here. Read input from STDIN. Print output to STDOUTmodule Main whereimport System.Random as RandomsplitT'' :: ([Int], [Int]) -> (Int -> Bool) -> ([Int], [Int])splitT原创 2016-09-19 21:40:51 · 595 阅读 · 0 评论 -
Python Java Haskell 计算fibonacci 第 1000000 个数消耗的时间
偶然间看到一个博客:https://www.cnblogs.com/charlesblc/p/5950898.html “”“各种语言性能(CPU密集型程序)比较 都进行Fib数列计算,计算到n=40的计算时间:”“”觉得只计算第40个fibonacci数列就要花费这么久的时间有点不认同,就做了Python Java Haskell这三个语言之间的小测试注:需要注意的是,我写的小测试是不严谨的,...原创 2018-03-24 21:28:41 · 854 阅读 · 0 评论 -
intellij haskell 插件使用分享
Haskell语言编程的ide有eclipse,intellij idea, vim,vscode等,还有一个leksah。对于leksah由于没有读过用户手册虽然有安装过,但不知道是怎么用的,vim有配置过,用起来还可以,但做为一个ide来说是比不上intellij idea的(自我感觉)这个文章主要分享一下自己配置和使用intellij hasekll插件的经过及感受。intellij has...原创 2018-03-26 18:49:26 · 3528 阅读 · 0 评论