| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [View Raw Code] [Original HTTPS Page] |
As an introductory example, here is the usual "Hello World" written in PureScript:
module Main where
import Effect.Console
main = log "Hello, World!"The following code defines a Person data type and a function to generate a string representation for a Person:
data Person = Person { name :: String, age :: Int }
showPerson :: Person -> String
showPerson (Person o) = o.name <> ", aged " <> show o.age
examplePerson :: Person
examplePerson = Person { name: "Bonnie", age: 26 }Line by line, this reads as follows:
The full language reference continues below:
| Back | FazBrowse Home | New Git URL |