Skip to content

Instantly share code, notes, and snippets.

import Component from '@ember/component';
import { action } from '@ember/object';
export default class extends Component {
init() {
super.init();
this.setShowYield(this.showYield);
}
@action
import Ember from 'ember';
import { task, timeout } from 'ember-concurrency';
export default Ember.Controller.extend({
messages: Ember.computed(() => []),
parent: task(function*() {
try {
yield this.get('child').perform();
} catch (error) {
@dfreeman
dfreeman / list-out-of-lambda.js
Last active February 23, 2017 17:26 — forked from sjl/list-out-of-lambda.js
Took the (native-)Boolean-free challenge. Approach shamelessly lifted from the λ-calculus, of course, but still a good exercise.
/************************************
* List Stuff *
************************************/
var empty_list = function(selector) {
return selector(undefined, undefined, tru);
};
var prepend = function(el, list) {
return function(selector) {