We see three varied examples of where natural transformations come in handy. const Right = x => ({ chain : f => f(x), ap : other => other.map(x), traverse : (of, f) => f(x).map(Right), map : f => Right(f(x)), fold : (f, g) => g(x), conca…
We learn what a natural transformation is and see the laws it must obey. We will see how a natural transformation must uphold the law of nt(x).map(f) == nt(x.map(f)) The rule is: "We have functor nt holding x, map to function f" should equals to…
We find a couple of DOM nodes that may or may not exist and run a calculation on the page height using applicatives. For example we want to get the main content section size by reduce the height of header and footer, nomarlly we will do like this: 1.…
1 Function<T, R>中的T, R表示接口输入.输出的数据类型. R apply(T t) apply: .例子:func是定义好的Function接口类型的变量,他的输入.输出都是Integer类型,调用calculate方法时,将func作为参数传入,对参数5进行处理. FunctionTest functionTest = new FunctionTest(); // return e + 5;就是apply方法的具体实现 Function<Integer, String…
colah's blog Blog About Contact Neural Networks, Manifolds, and Topology Posted on April 6, 2014 topology, neural networks, deep learning, manifold hypothesis Recently, there’s been a great deal of excitement and interest in deep neural networks beca…
the main steps: 1. look at the big picture 2. get the data 3. discover and visualize the data to gain insights 4. prepare the data for machine learning algorithms 5. select a model and train it 6. fine-tune your model 7. present your solution 8. laun…
Java8(1)新特性介绍及Lambda表达式 前言: 跟大娃一块看,把原来的电脑拿出来放中间看视频用 --- 以后会有的课程 难度 深入Java 8 难度1 并发与netty 难度3 JVM 难度4 node 难度2 spring精髓 难度1 课程中提到的知识: 前后端分离的开发,是靠node当做中间的 netty,已经成为国内外互联网公司的标配.会涉及底层的源代码的理解. JVM 涉及的东西比较多.虽然天天用,但是没有深入理解过.各种锁,可见性等.与计算机原理息息相关的. 圣思园主要面对与已…
本文作者:Jay Kreps,linkedin公司首席工程师:文章来自于他在linkedin上的分享:原文标题:The Log: What every software engineer should know about real-time data’s unifying abstraction. 文章内容非常干货,非常值得学习.文章将以四部分进行阐述,建议大家耐心看完. 第一部分:Log是什么? 第二部分:数据集成 第三部分:日志和实时流处理 第四部分:系统建设 我在六年前的一个令人兴奋的时…
Functor laws: 1. Identity: map(id) == id 2. Composition: compose(map(f), map(g)) == map(compose(f,g)) compose( map(toUpper), map(reverse), toArray )("bingo"); compose( map( compose(toUpper reverse), toArray ) )("bingo") Natural Transfo…
Category Theory: 01 One Structured Family of Structures 这次看来要放弃了.看了大概三分之一.似乎不能够让注意力集中了.先更新吧. 群的定义 \(G = \{ G, +, e \}\),一个数据集\(G\),一个二元操作符\(+\),和一个幺元\(e\). 满足结合律:\((a + b) + c = a + (b + c)\) 满足封闭性. 存在单位元:\(e + a = a = a + e\) 存在逆元:对于每一个a,存在一个逆元a': \…