多巧啊, 人家姓 Curry 名 Haskell, 难怪 Haskell 语言会自动柯里化, 呵呵. 但是不奇怪吗, 为什么要柯里化呢. 为什么如此重要导致 Haskell 会默认自动柯里化所有函数, 不就是返回一个部分配置好的函数吗.
我们来看一个 Haskell 的代码.
max 3 4
(max 3) 4
from pyv8 import PyV8 | |
string = ''' | |
function _a(d){for(var b="",a=0,c=c1=c2=0;a<d.length;)c=d.charCodeAt(a),128>c?(b+=String.fromCharCode(c),a++):191<c&&224>c?(c2=d.charCodeAt(a+1),b+=String.fromCharCode((c&31)<<6|c2&63),a+=2):(c2=d.charCodeAt(a+1),c3=d.charCodeAt(a+2),b+=String.fromCharCode((c&15)<<12|(c2&63)<<6|c3&63),a+=3);return b} function _b(a,b){b=a.length-b;return a.substr(b)+a.substr(0,b)}function _c(a,i,j){a[i%a.length]=a.splice(j%a.length,1,a[i%a.length])[0];}function _d(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if("func |
#-*- coding=utf-8 -*- | |
""" | |
知乎图片下载器 | |
""" | |
import requests | |
import re | |
import json | |
import time | |
from PIL import Image | |
import cStringIO |
// ==UserScript== | |
// @name 嗅探迅雷链接 Jaeger | |
// @namespace https://gist.github.com/jae-jae/70f175342130f11df1ae7bd54b93581e | |
// @version 1.4.6 | |
// @description 嗅探页面内所有迅雷下载链接,方便批量离线下载 | |
// @author Jaeger <[email protected]> | |
// @icon http://lixian.vip.xunlei.com/favicon.ico | |
// @include http* | |
// @require https://raw.githubusercontent.com/jae-jae/l.js/master/userjs/l.userjs.min.js | |
// @require https://gist.githubusercontent.com/jae-jae/35a1833079d26e6c9d9c6d5bed982353/raw/userjs-base.js |
// | |
// _oo0oo_ | |
// o8888888o | |
// 88" . "88 | |
// (| -_- |) | |
// 0\ = /0 | |
// ___/`---'\___ | |
// .' \\| |// '. | |
// / \\||| : |||// \ | |
// / _||||| -:- |||||- \ |
This gist assumes:
// See comments below. | |
// This code sample and justification brought to you by | |
// Isaac Z. Schlueter, aka isaacs | |
// standard style | |
var a = "ape", | |
b = "bat", | |
c = "cat", | |
d = "dog", |