tfwh-0.3.7.0

Safe HaskellSafe
LanguageHaskell2010

TFwH.Chap02.ExB

Description

第2章 練習問題 B

GHCi のプロンプトで以下のコマンドを順に試してみよう.

:type [0, 1)
:type double -3
:type double (-3)
:type double double 0
:type if 1 == 0 then 2 == 1
:type "++" == "+" ++ "+"
:type [(+), (-)]
:type [[], [[]], [[[]]]]
:type concat ["tea", "for", '2']
:type concat ["tea", "for", "2"]

Synopsis

Documentation

double :: Int -> Int Source #

double = (2 *)