⚠️ This lesson is retired and might contain outdated information.

Introduction - Functional programming concepts in PureScript

Vincent Orr
InstructorVincent Orr

Share this video with your friends

Send Tweet
Published 5 years ago
Updated 7 months ago

All that you require to do this course is to go to http://try.purescript.org in your favourite browser and be prepared to enter the rabbit's hole of functional programming in PureScript!!

Instructor: [00:01] This course is going to be about learning functional programming concepts using the language, PureScript. PureScript is a language that is statically typed, inspired by Haskell, and it compiles down to JavaScript, thus giving you all the great features that you get from a statically typed language, and no runtime errors.

[00:18] Functional programming has greatly increased in popularity, and plenty of JavaScript developers use it in production. There, you can achieve a great deal in JavaScript. It isn't a purely functional language, and therefore, it usually requires some workarounds or boilerplating.

[00:32] PureScript is used by various companies around the world in apps that are currently in production. The entirety of this course is going to be carried out on trypurescript.org, which is an online playground for PureScript. You'll easily be able to follow along without the needs of installing anything.

[00:50] In this course, we'll be looking at various functional programming concepts. Hopefully, these basic concepts should become familiar by the end of this course. We'll be investigating currying and partial application, and we'll look into cases and simple pattern matching.

[01:05] We'll have some data constructors, type aliases, then a little bit of recursion, and then we'll create our own length function. After that, we'll do an introduction to ADTs, which is algebraic data types, then list and the infix operator, followed by functor and map, filter, concat, and concatMap, forward L, and then we'll make functions out of forward L.

[01:32] There'll be plenty to get your teeth into. More than likely, you'll find yourself going over the lesson a couple of times to fully understand the concept. I really hope that this course will give you enough of a taste to further discover what functional programming truly has to offer.

[01:46] Though the PureScript community isn't massively mainstream, it is one that is super friendly, and very welcoming to newcomers. Please feel free to reach out if you have any questions or anything you don't understand. Finally, I hope that you enjoy the course.

~ 5 years ago

Any idea why the purescript community still uses bower?

Vincent Orr
Vincent Orrinstructor
~ 5 years ago



there is also a PureScript specific package management which is growing in popularity https://github.com/purescript/psc-package

Stephen Matthew Davies
Stephen Matthew Davies
~ 3 years ago

It's a bit disappointing thee whole course is in the browser, one of the criticisms / difficulties of purescript is to get it running locally. The docs are improving but still a little involved, with many deps issues. It would have been great to see install instructions here too,