Basic unit type:
λ> replTy "()"
() :: ()Basic functions:
| accept a required header param [OLD] x 110,222 ops/sec ±2.40% (84 runs sampled) | |
| accept a required header param [NEW] x 5,673,283 ops/sec ±0.92% (87 runs sampled) | |
| => fastest is accept a required header param [NEW] | |
| accept a required path param [OLD] x 111,359 ops/sec ±1.77% (87 runs sampled) | |
| accept a required path param [NEW] x 67,758,969 ops/sec ±0.48% (92 runs sampled) | |
| => fastest is accept a required path param [NEW] | |
| accept a required query param [OLD] x 112,662 ops/sec ±1.70% (91 runs sampled) | |
| accept a required query param [NEW] x 29,308,949 ops/sec ±0.76% (93 runs sampled) | |
| => fastest is accept a required query param [NEW] | |
| accept an optional header param [OLD] x 118,339 ops/sec ±1.96% (89 runs sampled) |
| 2016/01/26 20:46:49 Recovered: runtime error: index out of range | |
| 2016/01/26 20:46:49 Message was: type:MsgApp to:2 from:1 term:2 logTerm:2 index:46734 entries:<Type:EntryNormal Term:2 Index:46735 Data:"\"foo\"" > entries:<Type:EntryNormal Term:2 Index:46736 Data:"\"foo\"" > entries:<Type:EntryNormal Term:2 Index:46737 Data:"\"foo\"" > entries:<Type:EntryNormal Term:2 Index:46738 Data:"\"foo\"" > entries:<Type:EntryNormal Term:2 Index:46739 Data:"\"foo\"" > entries:<Type:EntryNormal Term:2 Index:46740 Data:"\"foo\"" > entries:<Type:EntryNormal Term:2 Index:46741 Data:"\"foo\"" > entries:<Type:EntryNormal Term:2 Index:46742 Data:"\"foo\"" > entries:<Type:EntryNormal Term:2 Index:46743 Data:"\"foo\"" > entries:<Type:EntryNormal Term:2 Index:46744 Data:"\"foo\"" > entries:<Type:EntryNormal Term:2 Index:46745 Data:"\"foo\"" > entries:<Type:EntryNormal Term:2 Index:46746 Data:"\"foo\"" > entries:<Type:EntryNormal Term:2 Index:46747 Data:"\"foo\"" > entries:<Type:EntryNormal Term:2 Index:46748 Data:"\"foo\"" > entri |
| use std::boxed::Box; | |
| use std::option::Option; | |
| use std::result::Result; | |
| pub trait Functor<'a, A, B, F: Fn(&'a A) -> B> { | |
| type Output; | |
| fn fmap(&'a self, f: F) -> Self::Output; | |
| } | |
| pub fn fmap<'a, A, B, X: Functor<'a, A, B, F>, F: Fn(&'a A) -> B>(x: &'a X, f: F) -> X::Output { |
Basic unit type:
λ> replTy "()"
() :: ()Basic functions:
I hereby claim:
To claim this, I am signing this object:
| <?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
| <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" | |
| "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> | |
| <!-- Generated by graphviz version 2.38.0 (20140413.2041) | |
| --> | |
| <!-- Title: /usr/local/bin/docker; 157.2 MB Pages: 1 --> | |
| <svg width="100%" height="100%" | |
| xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> | |
| <script type="text/ecmascript"><![CDATA[ | |
| // SVGPan |
| module.exports = function attemptQ (f) { | |
| var d = require('q').defer(); | |
| this.attempt(function (i) { | |
| f(i).then(d.resolve.bind(d), function (e) { | |
| this.retry(e) || d.reject(this.mainError()); | |
| }.bind(this)); | |
| }); | |
| return d.promise; | |
| }; |
| var Stream = require('stream'), | |
| Docker = require('dockerode'); | |
| var docker = new Docker({socketPath: '/var/run/docker.sock'}); | |
| function StreamBuffer () { | |
| Stream.call(this); | |
| this.arr = []; |
| var buf = []; | |
| for (var i = 0; i < State.funs.length; i++) { | |
| map_results = []; | |
| try { | |
| State.funs[i](doc); | |
| buf.push(Couch.toJSON(map_results)); | |
| } catch (err) { | |
| handleViewError(err, doc); | |
| // If the error is not fatal, we treat the doc as if it | |
| // did not emit anything, by buffering an empty array. |