Take a function as arguement, and the function only return true of false.

If the function 'f' return ture, when complement(f) will return false.

  1. var isEven = n => n % === ;
  2. var isOdd = R.complement(isEven);
  3. isOdd(); //=> true
  4. isOdd(); //=> false

[Ramda] Complement: Logic opposite function的更多相关文章

  1. [Ramda] Eliminate Function Arguments (Point-Free Style) with Ramda's Converge

    When doing comparisons inside of functions, you end of relying heavily on the argument passed into t ...

  2. [Cycle.js] Generalizing run() function for more types of sources

    Our application was able to produce write effects, through sinks, and was able to receive read effec ...

  3. [Cycle.js] Customizing effects from the main function

    How can we show one string on the DOM, and a completely different string on Console log? This lesson ...

  4. [Cycle.js] Main function and effects functions

    We need to give structure to our application with logic and effects. This lessons shows how we can o ...

  5. [Javascript] Multiply Two Arrays over a Function in JavaScript

    Just like the State ADT an Array is also an Applicative Functor. That means we can do the same trick ...

  6. table2excel使用

    原table2excel代码 /* * 采用jquery模板插件——jQuery Boilerplate * * Made by QuJun * 2017/01/10 */ //table2excel ...

  7. DAC Essentials

    http://e2e.ti.com/blogs_/b/analogwire/archive/tags/DAC%2bEssentials DAC Essentials: A new blog serie ...

  8. Massively parallel supercomputer

    A novel massively parallel supercomputer of hundreds of teraOPS-scale includes node architectures ba ...

  9. Dynamic range compression

    这段时间终于把手头的东西都搞完了,还剩下一个AEC这个模块,这个模块跟整个系统机制有很大关系,单独的模块意义不大. 另外,刚写完一个分类器,希望能大幅提升音乐流派分类的准确率. 下周正式开搞AEC,把 ...

随机推荐

  1. OpenStack安装及监控配置视频教程

    OpenStack是一个美国国家航空航天局和Rackspace合作研发的云端运算软件,是一个自由软件和开放源代码项目,用来建立公共和私有云本,其软件使用比较复杂,本视频将讲解其安装和部分配置方法,以后 ...

  2. OpenCV —— ROI

    通过 cvResetImageRoI 函数释放ROI是非常重要的,否则其他操作将默认在ROI区域中进行 通过巧妙的使用widthStep,可以达到同ROI一样的效果 —— 如果想设置和保持一副图像的多 ...

  3. MVC和MTV设计模式

    1.MVC MVC最初是由施乐公司旗下的帕罗奥多研究中心中的一位研究人员给 smalltalk语言发明的一中软件设计模式. MVC概述:MVC全名是ModelViewController,是模型(mo ...

  4. PA模块经常使用表

    SELECT * FROM pa_projects_all; --项目 SELECT * FROM pa_project_types; --项目类型 SELECT * FROM pa_project_ ...

  5. js37---Function.prototype

    //给函数的prototype新增名字为name,函数体为fn的函数 Function.prototype.method =function(name,fn){ this.prototype[name ...

  6. funuiTitle-居中问题修改

    今天遇到了一个问题,在一个actionbar上,title居中了,现在想要的方式是,让actionbar上显示返回按钮,后面紧跟着title.当时自己一直尝试要找到activity,然后在theme中 ...

  7. JS ajax 应用 (下拉列表联动)

        <script language="javascript"> var http_request=false;    function send_request( ...

  8. sql跳过非工作日(周末和节假日)

    简介:场景1:基于开始日期和工期,推算结束日期. 场景2:基于开始日期和结束日期,计算工期 注:需要自己做界面维护工作日表(s_WorkDay)和节假日表(s_SpecialDay) 涉及到的数据表 ...

  9. 通俗理解vuex原理---通过vue例子类比

    本文主要通过简单的理解来解释下vuex的基本流程,而这也是vuex难点之一. 首先我们先了解下vuex的作用 vuex其实是集中的数据管理仓库,相当于数据库mongoDB,MySQL等,任何组件都可以 ...

  10. unity-unet-同步各个player唯一标识

    Multiplayer Game 中所有 player 都有一个唯一标识.在unet中可以通过 Network Identity 组件获取到该 player 在整个网络整的 唯一 的连接 id 这里测 ...