question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Named taggedSum from the example is broken (Node 6.9)

const daggy = require('daggy')
const Option = daggy.taggedSum('Option', {
  Some: ['x'],
  None: [],
})
$ node example.js 
/Users/gleb/git/training/node/daggy-maybe/node_modules/daggy/daggy.js:149
            definitions[key] = tagged.apply(null, constructors[key]);
                                      ^

TypeError: CreateListFromArrayLike called on non-object
    at Object.taggedSum (/Users/gleb/git/training/node/daggy-maybe/node_modules/daggy/daggy.js:149:39)
    at Object.<anonymous> (/Users/gleb/git/training/node/daggy-maybe/example.js:2:22)

One can skip string 'Option' but then there are no Option.Some.is methods

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
amsrosscommented, Apr 3, 2017

If you’re using the version provided by npm, you’d need to follow the docs there as the current state of the repository and the current version available on npm are not the same (https://www.npmjs.com/package/daggy).

On github you could see them here: https://github.com/fantasyland/daggy/tree/v0.0.1/

1reaction
amsrosscommented, Apr 3, 2017
Read more comments on GitHub >

github_iconTop Results From Across the Web

Use broken in a sentence
How to use broken in a sentence. Example sentences with the word broken. The most voted sentence example for broken is They had...
Read more >
English example sentences with "broken" - Gikken
My television was broken down, so I had to get it repaired. There was a broken cup on the table. The path is...
Read more >
Use broken in a sentence - Examples - Bab.la
Something's broken." · Is that piston broken? · It's broken. · to be broken on the wheel · a broken arm · to...
Read more >
BROKEN in a sentence. BROKEN sentence examples. lengusa
Sentence examples for broken from high-quality English sources. · The tests were broken. New York Times · The computers are broken. Business Insider...
Read more >
use broken in a sentence, broken example sentences, how to ...
Our school has broken up for the summer. My leg was broken in a traffic accident. The top of the wall was lined...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found