]> git.rmz.io Git - my-scheme.git/log
my-scheme.git
7 years agoRead two arguments from commandline
Samir Benmendil [Sat, 13 Jan 2018 21:59:14 +0000 (21:59 +0000)]
Read two arguments from commandline

`!!` is the "list indexing" operator. It returns the value in the list
on the lhs at the index on the rhs.

`++` concatenates two lists.

A string is a list of chars.

7 years agoHello World with argument
Samir Benmendil [Sat, 13 Jan 2018 21:56:06 +0000 (21:56 +0000)]
Hello World with argument

This will simply print "Hello, " followed by the first argument from the
commandline.

Every Haskell program needs to have a main "action" in the Main module.
This is the entry point.

Files starting with `module <Foo>` will be part of the `Foo` module.

By convention modules are capitalized and definitions aren't.

`import System.Environment` provides `getArgs` to access cli arguments.

Haskell is strongly typed and types may be assigned with `::`. In this case
`main` is of type `IO ()` which is an IO action holding no information.
(more on that later hopefully, as I don't fully understand that.)

7 years agoNew project
Samir Benmendil [Sat, 13 Jan 2018 21:28:41 +0000 (21:28 +0000)]
New project

This project was generated by `stack new`. Some files are obviously not
in use yet, or simply wrong.

7 years agoRoot Commit
Samir Benmendil [Sat, 13 Jan 2018 20:45:07 +0000 (20:45 +0000)]
Root Commit