Skip to content

Commit

Permalink
create リストの先頭・末尾の要素を取り除く. #3
Browse files Browse the repository at this point in the history
  • Loading branch information
kayhide committed Apr 8, 2017
1 parent 308d577 commit 4bc7d40
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1,16 @@
リストの先頭・末尾の要素を取り除く
==================================

先頭の要素を取り除くには`tail`を使います。

```haskell
> tail [0..5]
[1,2,3,4,5]
```

末尾の要素を取り除くには`init`をつかいます。

```haskell
> init [0..5]
[0,1,2,3,4]
```

0 comments on commit 4bc7d40

Please sign in to comment.