Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.


    Introduction - Functional programming concepts in PureScript

    0.11.7 - ^0.12

    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!!



    Become a Member to view code

    You must be a Pro Member to view code

    Access all courses and lessons, track your progress, gain confidence and expertise.

    Become a Member
    and unlock code for this lesson
    orLog In




    Instructor: 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.

    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.

    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.

    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.

    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.

    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.

    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.