Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

HaskellLanguage: Difference between revisions

From ZeroWiki
imported>bluemir
No edit summary
 
(Repair MoniWiki formatting after migration)
 
(2 intermediate revisions by the same user not shown)
Line 35: Line 35:
  (<=) :: (Ord a) => a -> a -> Bool
  (<=) :: (Ord a) => a -> a -> Bool


[[include(틀:ProgrammingLanguage)]]
{{:틀:[[ProgrammingLanguage]]}}


[[언어분류]], [[FunctionalLanguage]]
[[언어분류]], [[FunctionalLanguage]]

Latest revision as of 00:34, 29 March 2026

[1][2]


이전 프로그래밍잔치 때 사용했었던 FunctionalLanguage.

자료

Haskell Interpreters

쓰레드

  • 저 위에보면, featuring static typing, higher-order functions, polymorphism, type classes and modadic effects 라고 있는데, 이것들이 아마 haskell language의 큰 특징들이 아닐까 한다. 각각에 대해서 알아두는게 도움이 될듯. (monad관련자료)- 임인택
  • Prelude> :t 3
    • 3 :: (Num t) => t
    • 오늘 굉장한 사실 하나를 알아버렸다. Haskell에서 값인줄로 알았던 3도.. 함수였던 것이다... 덜덜덜;; - 임인택
      • (Num t)는 t의 자료형이 Num이라고 알려주는 것이에요. 함수는 화살표가 -> 로 나오네요.^^
      • 아 그런건가? 땡스~

함수를 정의할 때 한 곳에 모아두어야 한다. 따라서 다음은 오류이다.

f x = x
g x = x
f x = x
    Multiple declarations of `Main.f'
    Declared at: test.hs:1:0
                 test.hs:3:0

연산자 처럼 보이는 녀석들도 함수이다.

Prelude> :t (<=)
(<=) :: (Ord a) => a -> a -> Bool

{{:틀:ProgrammingLanguage}}

언어분류, FunctionalLanguage