{"id":20020186,"url":"https://github.com/wonism/haskell-study","last_synced_at":"2026-03-06T11:02:46.139Z","repository":{"id":94612475,"uuid":"153886454","full_name":"wonism/haskell-study","owner":"wonism","description":null,"archived":false,"fork":false,"pushed_at":"2018-10-20T08:44:40.000Z","size":1,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-01T16:09:20.230Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wonism.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-20T08:44:17.000Z","updated_at":"2018-10-21T08:17:04.000Z","dependencies_parsed_at":"2023-03-29T14:37:39.569Z","dependency_job_id":null,"html_url":"https://github.com/wonism/haskell-study","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wonism/haskell-study","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wonism%2Fhaskell-study","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wonism%2Fhaskell-study/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wonism%2Fhaskell-study/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wonism%2Fhaskell-study/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wonism","download_url":"https://codeload.github.com/wonism/haskell-study/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wonism%2Fhaskell-study/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30173351,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T07:56:45.623Z","status":"ssl_error","status_checked_at":"2026-03-06T07:55:55.621Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T08:30:12.388Z","updated_at":"2026-03-06T11:02:46.066Z","avatar_url":"https://github.com/wonism.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Haskell\n\n## 특징\n- 함수형 프로그래밍 언어로 참조 효과가 없기 때문에 부작용이 없다.\n- 정적 타입 언어이다.\n- 좋은 형식 유추를 사용하기 때문에 변수 선언 시 하스켈이 자체적으로\n  알아낼 수 있는 유형의 레이블을 지정할 필요가 없다.\n- 함수 이름, 공백을 입력한 다음 인자를 공백으로 구분하여 씀으로써 함수를\n  호출할 수 있다.\n- 인자를 괄호로 묶음으로써 우선순위를 높일 수 있다.\n- 함수 이름을 backtick(\\`)으로 묶고 중위 표기법을 사용하여 함수를 호출할\n  수 있다.\n```hs\n$ add x y = x + y\n$ 3 `add` 4\n# 7\n```\n- if 문은 또다른 표현식일 뿐이며, else는 반드시 후행되어야 한다.\n- 함수는 소문자로 시작되어야 한다.\n- 리스트는 동질적인 데이터 구조로 단일 리스트에 다른 유형의 요소를 사용할 수 없다.\n- `++` 연산자를 통해 리스트에 리스트를 추가할 수 있다.\n```hs\n$ [1, 2, 3] ++ [4, 5, 6]\n# [1, 2, 3, 4, 5, 6]\n```\n- `:`를 사용하여 리스트의 시작 부분에 요소를 추가할 수 있다.\n```hs\n$ 0 : [1, 2, 3]\n# [0, 1, 2, 3]\n```\n- `!!`를 사용하여 리스트에서 요소를 가져올 수 있다.\n```hs\n$ [1, 2, 3, 4, 5] !! 3\n# 4\n```\n- 리스트는 비교될 수 있다.\n\n## Functions for List\n__head__\n```hs\n-- take a list and return its first element\n\nhead [1, 2, 3, 4, 5]\n-- Output : 1\n```\n\n__tail__\n```hs\n-- take a list and return its every elements except the head\n\ntail [1, 2, 3, 4, 5]\n-- Output : [2, 3, 4, 5]\n```\n\n__last__\n```hs\n-- take a list and return its last element\n\nlast [1, 2, 3, 4, 5]\n-- Output : 5\n```\n\n__init__\n```hs\n-- take a list and return its every elements except the last\n\ninit [1, 2, 3, 4, 5]\n-- Output : [1, 2, 3, 4]\n```\n\n__length__\n```hs\n-- take a list and return its length\n\nlength [1, 2, 3, 4, 5]\n-- Output : 5\n```\n\n__null__\n```hs\n-- take a element and a list and tell whether the list is empty\n\nnull [1, 2, 3, 4, 5]\n-- Output: False\n\nnull []\n-- Output: True\n```\n\n__reverse__\n```hs\n-- take a list and return the reversed list\n\nreverse [1, 2, 3, 4, 5]\n-- Output: [5, 4, 3, 2, 1]\n```\n\n__take__\n```hs\n-- take a number as an index and a list. then return the first n elements in the list\n\ntake 3 [1, 2, 3, 4, 5]\n-- Output: [1, 2, 3]\n```\n\n__drop__\n```hs\n-- take a number as an index and a list. then return the list without first that elements\n\ndrop 3 [1, 2, 3, 4, 5]\n-- Output: [4, 5]\n```\n\n__maximum__\n```hs\n-- take a list and return the biggest element\n\nmaximu [1, 2, 3, 4, 5]\n-- Output: 5\n```\n\n__minumum__\n```hs\n-- take a list and return the smallest element\n\nminimum [1, 2, 3, 4, 5]\n-- Output: 1\n```\n\n__sum__\n```hs\n-- take a list and return the sum of elements in list\n\nsum [1, 2, 3, 4, 5]\n-- Output: 15\n```\n\n__product__\n```hs\n-- take a list and return the product of elements in list\n\nsum [1, 2, 3, 4, 5]\n-- Output: 120\n```\n\n__elem__\n```hs\n-- take a element and a list and tell whether the element exist in the list\n\nelem 0 [1, 2, 3, 4, 5]\n-- Output: False\n\nelem 2 [1, 2, 3, 4, 5]\n-- Output: True\n```\n\n__range__\n```hs\n[1 .. 5]\n-- Output: [1, 2, 3, 4, 5]\n\n[1, 1.5 .. 5]\n-- Ouput: [1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0]\n\n[1, 4 .. 5]\n-- Output: [1, 4]\n```\n\n## Installation\n```\n$ brew install haskell-stack\n$ stack setup\n$ stack ghci\n```\n\n## Exit from GHCI\n- `Ctrl + D`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwonism%2Fhaskell-study","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwonism%2Fhaskell-study","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwonism%2Fhaskell-study/lists"}