aboutsummaryrefslogtreecommitdiff
path: root/Semestr 3/anm/l10.hs
diff options
context:
space:
mode:
authorFranciszek Malinka <franciszek.malinka@gmail.com>2021-02-25 14:42:55 +0100
committerFranciszek Malinka <franciszek.malinka@gmail.com>2021-02-25 14:42:55 +0100
commit9477dbe667f250ecd23f8fc0d56b942191526421 (patch)
treea4b50c9a726f415f835f5311c11c5d66e95f688c /Semestr 3/anm/l10.hs
parent1968c1e590077bd51844eacfac722d7963848cb8 (diff)
Stare semestry, niepoukladane
Diffstat (limited to 'Semestr 3/anm/l10.hs')
-rw-r--r--Semestr 3/anm/l10.hs16
1 files changed, 16 insertions, 0 deletions
diff --git a/Semestr 3/anm/l10.hs b/Semestr 3/anm/l10.hs
new file mode 100644
index 0000000..dfccaf4
--- /dev/null
+++ b/Semestr 3/anm/l10.hs
@@ -0,0 +1,16 @@
+-- Zadanie 1
+
+int :: (String -> a) -> String -> Integer -> a
+int f s n = f (s ++ show n)
+
+str :: (String -> a) -> String -> String -> a
+str f s1 s2 = f (s1 ++ s2)
+
+lit :: String -> (String -> a) -> String -> a
+lit s f s2 = f (s2 ++ s)
+
+(^^) :: (b -> c) -> (a -> b) -> a -> c
+(^^) = (.)
+
+sprintf :: ((String -> a) -> String -> String) -> String
+sprintf f = f id "" \ No newline at end of file