Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import _ from "lodash"
- import R from "ramda"
- function Doubler(activity: string) {
- this.activity = activity;
- }
- Doubler.prototype.map = function(f) {
- this.activity = `${f(this.activity)} ${f(this.activity)}`
- return this
- }
- function sayLoud(arg: string) { return _.upperCase(arg) }
- const iceCreamEater = new Doubler("Eating ice cream");
- console.log(sayLoud("something"));
- console.log(R.map(sayLoud, iceCreamEater))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement