Finished go/pov
This commit is contained in:
21
purescript/hello-world/README.md
Normal file
21
purescript/hello-world/README.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# Hello World
|
||||
|
||||
The classical introductory exercise. Just say "Hello, World!".
|
||||
|
||||
["Hello, World!"](http://en.wikipedia.org/wiki/%22Hello,_world!%22_program) is
|
||||
the traditional first program for beginning programming in a new language
|
||||
or environment.
|
||||
|
||||
The objectives are simple:
|
||||
|
||||
- Write a function that returns the string "Hello, World!".
|
||||
- Run the test suite and make sure that it succeeds.
|
||||
- Submit your solution and check it at the website.
|
||||
|
||||
If everything goes well, you will be ready to fetch your first real exercise.
|
||||
## Source
|
||||
|
||||
This is an exercise to introduce users to using Exercism [http://en.wikipedia.org/wiki/%22Hello,_world!%22_program](http://en.wikipedia.org/wiki/%22Hello,_world!%22_program)
|
||||
|
||||
## Submitting Incomplete Solutions
|
||||
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
17
purescript/hello-world/bower.json
Normal file
17
purescript/hello-world/bower.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "hello-world",
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"output"
|
||||
],
|
||||
"dependencies": {
|
||||
"purescript-prelude": "^3.0.0",
|
||||
"purescript-console": "^3.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"purescript-psci-support": "^3.0.0",
|
||||
"purescript-test-unit": "^11.0.0"
|
||||
}
|
||||
}
|
1
purescript/hello-world/src/HelloWorld.purs
Normal file
1
purescript/hello-world/src/HelloWorld.purs
Normal file
@@ -0,0 +1 @@
|
||||
module HelloWorld where
|
18
purescript/hello-world/test/Main.purs
Normal file
18
purescript/hello-world/test/Main.purs
Normal file
@@ -0,0 +1,18 @@
|
||||
module Test.Main where
|
||||
|
||||
import Prelude
|
||||
import Test.Unit (suite, test)
|
||||
import Test.Unit.Main (runTest)
|
||||
import Test.Unit.Assert as Assert
|
||||
import Data.Maybe (Maybe(Just, Nothing))
|
||||
import HelloWorld (helloWorld)
|
||||
|
||||
|
||||
main = runTest do
|
||||
suite "HelloWorld.helloWorld" do
|
||||
test "Hello with no name" do
|
||||
Assert.equal "Hello, World!" (helloWorld Nothing)
|
||||
test "Hello to a sample name" do
|
||||
Assert.equal "Hello, Alice!" (helloWorld (Just "Alice"))
|
||||
test "Hello to another sample name" do
|
||||
Assert.equal "Hello, Bob!" (helloWorld (Just "Bob"))
|
Reference in New Issue
Block a user