This document provides examples of functional JavaScript code using point-free style and typeclasses. It includes code snippets demonstrating:
- Composing functions using point-free style to remove unnecessary variables
- Implementing common typeclass methods like map, chain, and ap for a Container type
- Deriving typeclass instances for custom types to gain functionality like Functor, Applicative, Foldable
- Using typeclasses to compose functions operating on different container types in a uniform way
The document provides code samples but does not explain concepts in detail. It focuses on demonstrating point-free code and typeclass patterns through examples rather than performing in-depth explanations or performance analysis. Questions are provided at the end to prompt
Building Real Time Systems on MongoDB Using the Oplog at StripeStripe
MongoDB's oplog is possibly its most underrated feature. The oplog is vital as the basis on which replication is built, but its value doesn't stop there. Unlike the MySQL binlog, which is poorly documented and not directly exposed to MySQL clients, the oplog is a well-documented, structured format for changes that is query-able through the same mechanisms as your data. This allows many types of powerful, application-driven streaming or transformation. At Stripe, we've used the MongoDB oplog to create PostgresSQL, HBase, and ElasticSearch mirrors of our data. We've built a simple real-time trigger mechanism for detecting new data. And we've even used it to recover data. In this talk, we'll show you how we use the MongoDB oplog, and how you can build powerful reactive streaming data applications on top of it.
If you'd like to see the presentation with presenter's notes, I've published my Google Docs presentation at https://docs.google.com/presentation/d/19NcoFI9BG7PwLoBV7zvidjs2VLgQWeVVcUd7Xc7NoV0/pub
Originally given at MongoDB World 2014 in New York
Building Real Time Systems on MongoDB Using the Oplog at StripeMongoDB
MongoDB's oplog is possibly its most underrated feature. The oplog is vital as the basis on which replication is built, but its value doesn't stop there. Unlike the MySQL binlog, which is poorly documented and not directly exposed to MySQL clients, the oplog is a well-documented, structured format for changes that is query-able through the same mechanisms as your data. This allows many types of powerful, application-driven streaming or transformation. At Stripe, we've used the MongoDB oplog to create PostgresSQL, HBase, and ElasticSearch mirrors of our data. We've built a simple real-time trigger mechanism for detecting new data. And we've even used it to recover data. In this talk, we'll show you how we use the MongoDB oplog, and how you can build powerful reactive streaming data applications on top of it.
An Elephant of a Different Colour: HackVic Metcalfe
Slides from my GTA-PHP Meetup talk about Hack which is the Facebook version of the PHP programming language which runs under their HHVM runtime environment for PHP. The focus of my talk was the language improvements that the Facebook team has added to PHP.
There's a lot of information in the presenter's notes, so if you're interested in Hack scroll down to see the extras.
PhoneGap: Local Storage
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2013.
http://www.ivanomalavolta.com
Malli is a new Clojure/Script library for elegant data-driven data modelling. It is born from the real world needs of dynamic, distributed and multi-tenant systems: Schemas to describe the data should be first-class data. They should drive the runtime value transformations, web forms, rules and processes. Configuration should be explicit – no magic, macros or mutability. We should be able to infer, create and modify the models at runtime, persist and load them back from database and share over the wire, for both Clojure and ClojureScript. Like JSON Schema, but for EDN & Clojure/Script.
In this talk, I’ll walk through the core concepts, features and the lessons learned on creating Malli. I’ll also demonstrate some cool new things we can do with literal data schemas and compare it to prior art, including clojure.spec, plumatic schema and JSON Schema.
Part presentation, part debate about the future of the language while touching base on the current state of the industry with respect to ES6/ES2015, and the possibilities of using it today in web applications and frameworks, the different options, and the things to keep in mind. Additionally, we will do a walk-through on the new features included in ES7/ES2016 draft, and those that are being discussed for ES8/ES2017.
Lambda functions in C++ are unnamed functions contained typically within other functions and examples of their usage includes but is not limited to:
a) Specializing the behavior of an algorithm
b) Encapsulating complex expressions within a function
c) Creating callbacks to be passed onto other functions
Their syntax may look exotic, but once you get accustomed to them they can increase the readability of your software and prove to be particularly useful.
In this workshop we will learn about their syntax and demonstrate multiple real-world examples of their usage.
Tommi Reiman (https://twitter.com/ikitommi) will be presenting Malli
(https://github.com/metosin/malli) is a fresh new data-driven data
validation and specification library for Clojure/Script. In this talk,
Tommi will give a quick introduction to Malli, compare it to prior art
including Plumatic Schema and clojure.spec and demonstrate how to
elegantly solve real-world problems with it. Also, peek beyond the
runtime validation.
Clojure is a modern dynamically typed lisp. Dynamical typing is ofter associated with poor performance and runtime failures. In this talk, I'll present some of the lessons learned on building Clojure/Script systems that are both ridiculously fast and will fail fast on errors. Will compare the performance of mutable, persistent & zero-copy data structures and show how we can use interpreters and compilers to build beautiful and performant abstractions. A quick demo on how to build a simple non-blocking web server that runs idiomatic Clojure to serve millions of requests per sec.
Clojure is awesome, and it can be fast too.
Video: https://www.youtube.com/watch?v=3SSHjKT3ZmA
Test Driven Game Development with Cocos2d.
This is the first part of my 8th Light University talk on how to effectively write unit tests for game development. We're using Cocos2d for the framework, but the principles apply to most game frameworks.
Building Real Time Systems on MongoDB Using the Oplog at StripeStripe
MongoDB's oplog is possibly its most underrated feature. The oplog is vital as the basis on which replication is built, but its value doesn't stop there. Unlike the MySQL binlog, which is poorly documented and not directly exposed to MySQL clients, the oplog is a well-documented, structured format for changes that is query-able through the same mechanisms as your data. This allows many types of powerful, application-driven streaming or transformation. At Stripe, we've used the MongoDB oplog to create PostgresSQL, HBase, and ElasticSearch mirrors of our data. We've built a simple real-time trigger mechanism for detecting new data. And we've even used it to recover data. In this talk, we'll show you how we use the MongoDB oplog, and how you can build powerful reactive streaming data applications on top of it.
If you'd like to see the presentation with presenter's notes, I've published my Google Docs presentation at https://docs.google.com/presentation/d/19NcoFI9BG7PwLoBV7zvidjs2VLgQWeVVcUd7Xc7NoV0/pub
Originally given at MongoDB World 2014 in New York
Building Real Time Systems on MongoDB Using the Oplog at StripeMongoDB
MongoDB's oplog is possibly its most underrated feature. The oplog is vital as the basis on which replication is built, but its value doesn't stop there. Unlike the MySQL binlog, which is poorly documented and not directly exposed to MySQL clients, the oplog is a well-documented, structured format for changes that is query-able through the same mechanisms as your data. This allows many types of powerful, application-driven streaming or transformation. At Stripe, we've used the MongoDB oplog to create PostgresSQL, HBase, and ElasticSearch mirrors of our data. We've built a simple real-time trigger mechanism for detecting new data. And we've even used it to recover data. In this talk, we'll show you how we use the MongoDB oplog, and how you can build powerful reactive streaming data applications on top of it.
An Elephant of a Different Colour: HackVic Metcalfe
Slides from my GTA-PHP Meetup talk about Hack which is the Facebook version of the PHP programming language which runs under their HHVM runtime environment for PHP. The focus of my talk was the language improvements that the Facebook team has added to PHP.
There's a lot of information in the presenter's notes, so if you're interested in Hack scroll down to see the extras.
PhoneGap: Local Storage
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2013.
http://www.ivanomalavolta.com
Malli is a new Clojure/Script library for elegant data-driven data modelling. It is born from the real world needs of dynamic, distributed and multi-tenant systems: Schemas to describe the data should be first-class data. They should drive the runtime value transformations, web forms, rules and processes. Configuration should be explicit – no magic, macros or mutability. We should be able to infer, create and modify the models at runtime, persist and load them back from database and share over the wire, for both Clojure and ClojureScript. Like JSON Schema, but for EDN & Clojure/Script.
In this talk, I’ll walk through the core concepts, features and the lessons learned on creating Malli. I’ll also demonstrate some cool new things we can do with literal data schemas and compare it to prior art, including clojure.spec, plumatic schema and JSON Schema.
Part presentation, part debate about the future of the language while touching base on the current state of the industry with respect to ES6/ES2015, and the possibilities of using it today in web applications and frameworks, the different options, and the things to keep in mind. Additionally, we will do a walk-through on the new features included in ES7/ES2016 draft, and those that are being discussed for ES8/ES2017.
Lambda functions in C++ are unnamed functions contained typically within other functions and examples of their usage includes but is not limited to:
a) Specializing the behavior of an algorithm
b) Encapsulating complex expressions within a function
c) Creating callbacks to be passed onto other functions
Their syntax may look exotic, but once you get accustomed to them they can increase the readability of your software and prove to be particularly useful.
In this workshop we will learn about their syntax and demonstrate multiple real-world examples of their usage.
Tommi Reiman (https://twitter.com/ikitommi) will be presenting Malli
(https://github.com/metosin/malli) is a fresh new data-driven data
validation and specification library for Clojure/Script. In this talk,
Tommi will give a quick introduction to Malli, compare it to prior art
including Plumatic Schema and clojure.spec and demonstrate how to
elegantly solve real-world problems with it. Also, peek beyond the
runtime validation.
Clojure is a modern dynamically typed lisp. Dynamical typing is ofter associated with poor performance and runtime failures. In this talk, I'll present some of the lessons learned on building Clojure/Script systems that are both ridiculously fast and will fail fast on errors. Will compare the performance of mutable, persistent & zero-copy data structures and show how we can use interpreters and compilers to build beautiful and performant abstractions. A quick demo on how to build a simple non-blocking web server that runs idiomatic Clojure to serve millions of requests per sec.
Clojure is awesome, and it can be fast too.
Video: https://www.youtube.com/watch?v=3SSHjKT3ZmA
Test Driven Game Development with Cocos2d.
This is the first part of my 8th Light University talk on how to effectively write unit tests for game development. We're using Cocos2d for the framework, but the principles apply to most game frameworks.
Functional Patterns for the non-mathematicianBrian Lonsdorf
Fluentconf 2014 talk:
Functional design patterns such as lenses, arrows, functors, and monads all come from category theory. To fully grok them, you’ll probably have to wade through the whitest white papers, fighting the mathematical syntax and abstract examples.
I’m hoping to demonstrate the ideas into javascript. I’ll be showing direct and practical applications for every day programming.
Emerging Languages: A Tour of the HorizonAlex Payne
A tour of a number of new programming languages, organized by the job they're best suited for. Presented at Philadelphia Emerging Technology for the Enterprise 2012.
Not so long ago Microsoft announced a new language trageting on front-end developers. Everybody's reaction was like: Why?!! Is it just Microsoft darting back to Google?!
So, why a new language? JavaScript has its bad parts. Mostly you can avoid them or workaraund. You can emulate class-based OOP style, modules, scoping and even run-time typing. But that is doomed to be clumsy. That's not in the language design. Google has pointed out these flaws, provided a new language and failed. Will the story of TypeScript be any different?
jQuery & 10,000 Global Functions: Working with Legacy JavaScriptGuy Royse
Long ago, in the late days of the first Internet boom, before jQuery, before Underscore, before Angular, there was a web application built by a large corporation. This application was written as a server-side application using server-side technology like Java or PHP. A tiny seed of JavaScript was added to some of the pages of this application to give it a little sizzle.
Over the ages, this tiny bit of JavaScript grew like kudzu. Most of it was embedded in the HTML in
Developing High Performance Websites and Modern Apps with JavaScript and HTML5Doris Chen
Creating high performance sites and apps is crucial for every developer. In this session, we will explore the best practices and performance tricks, including startup time, UI responsiveness, and Memory efficiency to make your apps running faster and fluid. Come learn the tips, tricks, and tools for maximizing the performance of your sites and apps with JavaScript and HTML5.
Ten useful JavaScript tips & best practicesAnkit Rastogi
In this presentation there are ten useful JavaScript techniques which can be included in your application easily with less friction along with some AngularJs tips and best practices as a bonus. These tips and best practices are accompanied by examples & will cover script loading, design pattern, performance optimization and other areas.
Since best practices are very subjective topics, proper benchmarking needs to be done.
C++ is a middle-level programming language developed by Bjarne Stroustrup starting in 1979 at Bell Labs. C++ runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX.
This reference will take you through simple and practical approach while learning C++ Programming language.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Search and Society: Reimagining Information Access for Radical FuturesBhaskar Mitra
The field of Information retrieval (IR) is currently undergoing a transformative shift, at least partly due to the emerging applications of generative AI to information access. In this talk, we will deliberate on the sociotechnical implications of generative AI for information access. We will argue that there is both a critical necessity and an exciting opportunity for the IR community to re-center our research agendas on societal needs while dismantling the artificial separation between the work on fairness, accountability, transparency, and ethics in IR and the rest of IR research. Instead of adopting a reactionary strategy of trying to mitigate potential social harms from emerging technologies, the community should aim to proactively set the research agenda for the kinds of systems we should build inspired by diverse explicitly stated sociotechnical imaginaries. The sociotechnical imaginaries that underpin the design and development of information access technologies needs to be explicitly articulated, and we need to develop theories of change in context of these diverse perspectives. Our guiding future imaginaries must be informed by other academic fields, such as democratic theory and critical theory, and should be co-developed with social science scholars, legal scholars, civil rights and social justice activists, and artists, among others.
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
10. We can curry
var replace = curry(function(regex, x, replaceable) {
return replaceable.replace(regex, x);
});
var squish = replace(/s+/g, '');
squish("I like to move it move it"); // Iliketomoveitmoveit
11. We can compose
var wackyText = compose(capitalize, reverse, squish)
wackyText(“turtle power") // Rewopeltrut
12. Pointfree
var clientApp = compose(render, doThings, httpGet(‘/posts'))
var serverApp = compose(sendJSON, doThings, Db.all(‘posts’))
var shellApp = compose(display, doThings, prompt("what's up?"))
26. Pointfree
var getChildren = function(el) {
return el.childNodes;
}
var getAllChildren = function(els) {
return _.map(els, function(el) {
return getChildren(el);
});
}
var getChildren = get('childNodes')
var getAllChildren = map(getChildren)
27. Pointfree
var getChildren = function(el) {
return el.childNodes;
}
var getAllChildren = function(els) {
return _.map(els, function(el) {
return getChildren(el);
});
}
var getChildren = get('childNodes')
var getAllChildren = map(getChildren)
28. Pointfree
var getChildren = function(el) {
return el.childNodes;
}
var getAllChildren = function(els) {
return _.map(els, function(el) {
return getChildren(el);
});
}
var getChildren = get('childNodes')
var getAllChildren = map(getChildren)
GOOD
29.
30. Pointfree
var grandChildren = function(selector) {
var el = document.querySelector(selector);
var children = getChildren(el);
return map(getChildren, children);
}
var grandChildren = compose( map(getChildren)
, getChildren
, document.querySelector
)
31. Pointfree
var grandChildren = function(selector) {
var el = document.querySelector(selector);
var children = getChildren(el);
return map(getChildren, children);
}
var grandChildren = compose( map(getChildren)
, getChildren
, document.querySelector
)
GOOD
32.
33. Pointfree
var video = { src: 'http://youtube.com?v=23423'
, description: 'family matters ep1'
, screenshots: [ { url: 'i.ytimg.com/OrIxGlo.webp', size: ‘120x120' }
, { url: 'i.ytimg.com/3rAxRdb.webp', size: ‘1020x764' }
]
}
var thumb = compose(_.first, _.get(‘screenshots'))
var thumbUrl = compose(_.get('url'), thumb)
var thumbWithHost = compose(concat('http://youtube.com'), thumbUrl)
thumbWithHost(video)
// http://youtube.com/i.ytimg.com/OrIxaBJ9Glo.webp
34. Pointfree
var video = { src: 'http://youtube.com?v=23423'
, description: 'family matters ep1'
, screenshots: [ { url: 'i.ytimg.com/OrIxGlo.webp', size: ‘120x120' }
, { url: 'i.ytimg.com/3rAxRdb.webp', size: ‘1020x764' }
]
}
var thumbUrl = compose(_.get('url'), thumb)
var thumb = compose(_.first, _.get(‘screenshots'))
var thumbWithHost = compose(concat('http://youtube.com'), thumbUrl)
thumbWithHost(video)
// TypeError
35. Pointfree
var video = { src: 'http://youtube.com?v=23423'
, description: 'family matters ep1'
, screenshots: [ { url: 'i.ytimg.com/OrIxGlo.webp', size: ‘120x120' }
, { url: 'i.ytimg.com/3rAxRdb.webp', size: ‘1020x764' }
]
}
var thumbUrl = compose(_.get('url'), thumb)
var thumb = compose(_.first, _.get(‘screenshots'))
var thumbWithHost = compose(concat('http://youtube.com'), thumbUrl)
thumbWithHost(video)
// TypeError
Meh
66. Typeclass
We can flatten/un-nest them
M(M(a)) -> M(a)
[['hello']] -> ['hello']
Just(Just(true)) -> Just(true)
67. Typeclass
We can apply functions within them
M(a -> b) -> M(a) -> M(b)
68. Typeclass
We can apply functions within them
M(a -> b) -> M(a) -> M(b)
var finished = curry(function(click, anim) { alert(“Finished!"); });
EventStream.of(finished).ap(button_clicks).ap(animation_done);
96. Typeclass
do
a <- Just 3
b <- Just 1
return a + b
Just(3).chain(function(a) {
return Just(1).chain(function(b) {
return Maybe.of(a + b);
});
};
Haskell
JavaScript
97. Typeclass
do
a <- Just 3
b <- Just 1
return a + b
Haskell
JavaScript liftM2(add, Just(3), Just(1))
115. Shortcut Fusion
// g :: forall b. (t -> b -> b) -> b -> b
reduce(c, n, build(g)) = g(c, n)
116. Shortcut Fusion
//build :: (forall b. (a -> b -> b) -> b -> b) -> [a]
var build = function(g){
return g(concat, []);
}
//+ map :: (a -> b) -> [a] -> [b]
var map = curry(function(f, xs){
return build(function(c, n){
return reduce(function(acc, x){ return c(f(x), acc); }, n, xs);
});
});
117. Shortcut Fusion
var sum = reduce(add, 0);
var sqr = function(x) {return x * x }
var sumSqs = compose(sum, map(sqr))
// reduce(function(acc, x){ return add(sqr(x), acc) }, 0);
118. Compile while you
compose
//+ doorman :: [User] -> User
var doorman = compose(first, filter(gte(21)), map(_.get('age')));
119.
120. var addTwenty = memoize(function(x) {
return x + 20;
})
Memoization