From 31101069ca89118b7e6a802460c80d80e0d17f20 Mon Sep 17 00:00:00 2001 From: Jan Sucan Date: Tue, 7 Mar 2023 17:45:28 +0100 Subject: 1_a_2: Add solution --- ch01/1_a_2.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 ch01/1_a_2.txt (limited to 'ch01/1_a_2.txt') diff --git a/ch01/1_a_2.txt b/ch01/1_a_2.txt new file mode 100644 index 0000000..a4bffae --- /dev/null +++ b/ch01/1_a_2.txt @@ -0,0 +1,15 @@ +-- From ghci, type :? to print some help. Define a variable, such as let x = 1, +-- then type :show bindings. What do you see? + +ghci> :? + ... + + :show bindings show the current bindings made at the prompt + ... + +ghci> let x = 1 + +ghci> :show bindings +x :: Num a => a = _ + +-- We see a type of the bound variable 'x' -- cgit v1.2.3