Create an observable that emits each time a specific transition is taken.
This "flip" machine keeps tossing the coin each time it lands on head. The machine reaches its final state when the side is tail:
This is to the best of my knowledge the RIS specification as it was defined in 2011 by the original author. See https://en.wikipedia.org/wiki/RIS_(file_format)#cite_note-:1-5.
In order to run the scripts used to produce the dataset the following programs must be available on your system path:
Canonical post for my Stack Overflow Q&A
I have this simple Node.js library:
mylib/
|- inc.js
|- index.js
Things I found myself researching over and over without taking the time to write them down. Until now.
Table of Contents
In this article I compare the performance of the spread operator ...
and the performance of the assignement operator =
in the context of data transformation.
I show that using the spread operator isn't a trivial choice to make and I suggest that immutability and mutation don't have to be mutually exclusive. I also show how one-liner functions can be enriched with the comma operator ,
.
require('chromedriver'); | |
const path = require('path'); | |
const wd = require('selenium-webdriver'); | |
const chrome = require('selenium-webdriver/chrome'); | |
var builder = new wd.Builder(); | |
var options = new chrome.Options(); | |
var prefs = new wd.logging.Preferences(); | |
var driver; |
/** | |
* Return all permutations of given string. | |
* | |
* @example | |
* permute('abc'); | |
* //=> ['abc', 'acb', 'bac', 'bca', 'cab', 'cba'] | |
* @param str {String} | |
* @return {Array} | |
*/ | |
function permute(str) { |