Semigroup examples

Share this video with your friends

Send Tweet

A few examples of Semigroup definitions

Acamica
Acamica
~ 8 years ago

You mention you use a special immutable library that has some flare added. Are you talking about https://facebook.github.io/immutable-js/ or other?

Brian Lonsdorf
Brian Lonsdorf(instructor)
~ 8 years ago

Hi! Posting here for everyone: https://github.com/DrBoolean/immutable-ext

This library is not "my" ideas. Just a JS port of normal types from FP langs. Same functions will live in other FP libs which implement Map/List

sliwczy
sliwczy
~ 6 years ago

I tried to make last concat work using just vanillaJS (no 'require' from NodeJS) and failed; I checked and there is no export in this library so I cannot import Map (but he's just altering existing Map so maybe I don't have to); I tried to use this library both by linking from url and from local file and I still get:

Uncaught TypeError: Constructor Map requires 'new' at Map (<anonymous>) at script.js:19

Any advice on this?