Haskell
文字列を標準出力に出力 まずはプログラム掲載. p25, hello.hs main = putStrLn "Hello, World!"左辺のmainが変数名で,右辺がその値.「main = …」は変数mainの定義. で,このmainの値は関数ではなく,アクション.アクションはHaskellの値で,その値を評…
(節のふりかたは,本に準じてない) Haskellは関数型言語 Haskellは関数型言語.他に関数型言語には, ML Common Lisp Scheme などがある.関数型言語は関数プログラミングをするもの.関数プログラミングは,関数を中心としてプログラムを組む. うん,これ…
図書館をほっつき歩いていたら,「普通のHaskellプログラミング」が置いてあった.Haskellを始めようと思って色々調べてるときに,どうもこの本が一番とっつきやすそうだと思っていたので,図書館でたまたま見つけたときは,「おお,ラッキー」と思って,速…
1to10 11to20 21to30 31to40 51to60 61to70 71to80 81to90 91to99 all Ninety-Nine Haskell Problems 十問目. 10 Problem 10 (*) Run-length encoding of a list. Use the result of problem P09 to implement the so-called run-length encoding data comp…
1to10 11to20 21to30 31to40 51to60 61to70 71to80 81to90 91to99 all Ninety-Nine Haskell Problems 九問目. 9 Problem 9 (**) Pack consecutive duplicates of list elements into sublists. If a list contains repeated elements they should be placed…
1to10 11to20 21to30 31to40 51to60 61to70 71to80 81to90 91to99 all Ninety-Nine Haskell Problems 八問目. 8 Problem 8 (**) Eliminate consecutive duplicates of list elements. If a list contains repeated elements they should be replaced with a…
1to10 11to20 21to30 31to40 51to60 61to70 71to80 81to90 91to99 all Ninety-Nine Haskell Problems 七問目. 7 Problem 7 (**) Flatten a nested list structure. Transform a list, possibly holding lists as elements into a `flat' list by replacing …
1to10 11to20 21to30 31to40 51to60 61to70 71to80 81to90 91to99 all Ninety-Nine Haskell Problems 六問目. 6 Problem 6 (*) Find out whether a list is a palindrome. A palindrome can be read forward or backward; e.g. (x a m a x). Example in Has…
1to10 11to20 21to30 31to40 51to60 61to70 71to80 81to90 91to99 all Ninety-Nine Haskell Problems 五問目. 5 Problem 5(*) Reverse a list.Example in Haskell:Prelude> reverse "A man, a plan, a canal, panama!" "!amanap ,lanac a ,nalp a ,nam A" P…
1to10 11to20 21to30 31to40 51to60 61to70 71to80 81to90 91to99 all Ninety-Nine Haskell Problems 四問目. 4 Problem 4(*) Find the number of elements of a list.Example in Haskell:Prelude> myLength [123, 456, 789] 3 Prelude> myLength "Hello, w…
1to10 11to20 21to30 31to40 51to60 61to70 71to80 81to90 91to99 all Ninety-Nine Haskell Problems 三問目. 問題. 3 Problem 3(*) Find the K'th element of a list. The first element in the list is number 1.Example: (element-at '(a b c d e) 3) C…
1to10 11to20 21to30 31to40 51to60 61to70 71to80 81to90 91to99 all Ninety-Nine Haskell Problems 二問目. 一問目は大変な量になってしまったけど,二問目はあんなことにならないで欲しい.と希望を抱きつつ頑張る.まず,問題. 2 Problem 2(*) Find th…
ここにはNinety-Nine Haskell Problemsのproblem91からproblem99へのリンクを置く. problem91 problem92 problem93 problem94 problem95 problem96 problem97 problem98 problem99 1to10 11to20 21to30 31to40 51to60 61to70 71to80 81to90 91to99 all Nine…
ここにはNinety-Nine Haskell Problemsのproblem81からproblem90へのリンクを置く. problem81 problem82 problem83 problem84 problem85 problem86 problem87 problem88 problem89 problem90 1to10 11to20 21to30 31to40 51to60 61to70 71to80 81to90 91to9…
ここにはNinety-Nine Haskell Problemsのproblem71からproblem80へのリンクを置く. problem71 problem72 problem73 problem74 problem75 problem76 problem77 problem78 problem79 problem80 1to10 11to20 21to30 31to40 51to60 61to70 71to80 81to90 91to9…
ここにはNinety-Nine Haskell Problemsのproblem61からproblem70へのリンクを置く. problem61 problem62 problem63 problem64 problem65 problem66 problem67 problem68 problem69 problem70 1to10 11to20 21to30 31to40 51to60 61to70 71to80 81to90 91to9…
ここにはNinety-Nine Haskell Problemsのproblem51からproblem60へのリンクを置く. problem51 problem52 problem53 problem54 problem55 problem56 problem57 problem58 problem59 problem60 1to10 11to20 21to30 31to40 51to60 61to70 71to80 81to90 91to9…
ここにはNinety-Nine Haskell Problemsのproblem41からproblem50へのリンクを置く. problem41 problem42 problem43 problem44 problem45 problem46 problem47 problem48 problem49 problem50 1to10 11to20 21to30 31to40 51to60 61to70 71to80 81to90 91to9…
ここにはNinety-Nine Haskell Problemsのproblem31からproblem40へのリンクを置く. problem31 problem32 problem33 problem34 problem35 problem36 problem37 problem38 problem39 problem40 1to10 11to20 21to30 31to40 51to60 61to70 71to80 81to90 91to9…
ここにはNinety-Nine Haskell Problemsのproblem21からproblem30へのリンクを置く. problem21 problem22 problem23 problem24 problem25 problem26 problem27 problem28 problem29 problem30 1to10 11to20 21to30 31to40 51to60 61to70 71to80 81to90 91to9…
ここにはNinety-Nine Haskell Problemsのproblem11からproblem20へのリンクを置く. problem11 problem12 problem13 problem14 problem15 problem16 problem17 problem18 problem19 problem20 1to10 11to20 21to30 31to40 51to60 61to70 71to80 81to90 91to9…
ここにはNinety-Nine Haskell Problemsのproblem1からproblem10へのリンクを置く. problem1 problem2 problem3 problem4 problem5 problem6 problem7 problem8 problem9 roblem10 1to10 11to20 21to30 31to40 51to60 61to70 71to80 81to90 91to99 all Ninet…
1to10 11to20 21to30 31to40 51to60 61to70 71to80 81to90 91to99 all Ninety-Nine Haskell Problems とりあえず一問目を解いてみた. 1 Problem 1(*) Find the last element of a list.(Note that the Lisp transcription of this problem is incorrect.)Ex…
さっきまとめたのをいくつか見ていたところNinety-Nine Haskell Problemsが面白そうなので,これをメインにHaskellの勉強をしようと思う. Ninety-Nine Haskell Problemsでは,「Haskell使ってこんな機能実装しろや」という問題が,99個ならんでるみたい.プ…
やっぱりHaskellはcとかjavaとかに比べると,かっちりまとまったWebサイトは少ない.まぁ当たり前だけど. とりあえず,参考になりそうなページをまとめる. Haskellの紹介とか Introduction - HaskellWiki(日本語訳,About Haskell) Why Functional Program…
Haskellは純粋関数型プログラミング言語.関数型言語というものを全く知らないので,何が純粋なんだかはよくわからないけど,とにかくそうらしい.名前はどうでもいいとして,とにかく関数型というものがどんなものか知りたいので,Haskellを始めてみる. ま…