Questions tagged [folktale]

Folktale is a suite of libraries for generic functional programming in JavaScript that allows you to write elegant modular applications with fewer bugs and more reuse.

20 questions
0
votes
1 answer

Nested Validations With Folktale

I've been using Folktale's Validation on a new project and I've found it really useful, but I have hit a wall with the need for sequential validations. I have a config object and I need to perform the following validations: is is an Object? are the…
Undistraction
  • 42,754
  • 56
  • 195
  • 331
0
votes
1 answer

Immutablejs within plain objects - Monads

The redux best practices says not to mix plain javascript object with immutablejs objects. I'm trying my hand at functional programming and it seems like the monads require the computations/values to be stored inside an object, or some container of…
jmmendez
  • 91
  • 1
  • 3
0
votes
1 answer

λ: folktale data.task - apply an unknown number of Tasks

I am wanting to convert a list of id's into a list of Tasks, and run them concurrently, similar to Promise.all. I am aware of applicatives, but I want to apply an unknown number of tasks so I don't believe that will be the best approach. Say I have…
synthet1c
  • 6,152
  • 2
  • 24
  • 39
0
votes
2 answers

chaining (or mapping) Task containing a single data array to an array of Tasks

Part of learning Fanatasy Land/Folk Tale has lead me to creating some code. I am essnetially scnaning my network (via someLib) and uploading the results to a mongo repository. The scan returns back an array of results, while the upsert into mongo…
akaphenom
  • 6,728
  • 10
  • 59
  • 109
0
votes
2 answers

Use of Either and returning the error immediately

I have a function which returns an instance of Either where the Left side represent the exception / error, while the second side stores the return value. If the Either instance has been Left instantiated to the Error branch I want to return…
akaphenom
  • 6,728
  • 10
  • 59
  • 109
1
2