This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
someArray: Ember.computed(function() { | |
const arr = Ember.A([]); | |
arr.pushObject(Ember.Object.create({ | |
zero: 0, | |
someProp: 'zero', | |
})); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import getLeadAsset from "./get-lead-asset"; | |
const prepend = ({ type, data }, list) => { | |
if (!data) { | |
return list; | |
} | |
return [{ type, data }, ...list]; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
article(id: "b5df0b22-8870-11e8-a0fd-e428ecc3ac12") { | |
id | |
headline | |
publicationName | |
publishedTime | |
label | |
standfirst | |
flags | |
byline |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"data": { | |
"article": { | |
"id": "b5df0b22-8870-11e8-a0fd-e428ecc3ac12", | |
"headline": "Brexit climbdown as Theresa May accepts rebel amendment", | |
"publicationName": "TIMES", | |
"publishedTime": "2018-07-16T16:00:00.000Z", | |
"label": "", | |
"standfirst": | |
"Brussels would have to agree to collect tariffs on behalf of the UK", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = | |
foo (Just SomeRecord) model.prop1 | |
b = | |
foo a model.prop2 | |
c = | |
foo b model.prop3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foo : Maybe (a -> b) -> Maybe a -> Maybe b | |
foo a b = | |
Nothing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = | |
foo model.prop1 (Just SomeRecord) | |
b = | |
foo model.prop2 a | |
c = | |
foo model.prop3 b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foo : Maybe a -> Maybe (a -> b) -> Maybe b | |
foo a b = | |
Nothing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Just SomeRecord | |
|> foo model.prop1 | |
|> foo model.prop2 | |
|> foo model.prop3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Just SomeRecord | |
|> andMap model.prop1 | |
|> andMap model.prop2 | |
|> andMap model.prop3 |
OlderNewer