Skip to content

Instantly share code, notes, and snippets.

@tkf
Created January 20, 2022 17:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tkf/5012bd2e12f584ec8b6092476912c907 to your computer and use it in GitHub Desktop.
Save tkf/5012bd2e12f584ec8b6092476912c907 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="131.42598mm"
height="153.65784mm"
viewBox="0 0 131.42598 153.65784"
version="1.1"
id="svg5"
inkscape:version="1.1 (c4e8f9ed74, 2021-05-24)"
sodipodi:docname="folds.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview7"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:document-units="mm"
showgrid="false"
inkscape:zoom="1.0897757"
inkscape:cx="298.68531"
inkscape:cy="265.65099"
inkscape:window-width="1916"
inkscape:window-height="1036"
inkscape:window-x="0"
inkscape:window-y="20"
inkscape:window-maximized="1"
inkscape:current-layer="layer1"
showguides="true"
inkscape:guide-bbox="true"
inkscape:snap-text-baseline="true"
inkscape:snap-grids="false"
fit-margin-top="3"
lock-margins="true"
fit-margin-left="3"
fit-margin-right="3"
fit-margin-bottom="3">
<inkscape:grid
type="xygrid"
id="grid954"
originx="5.7781247"
originy="-9.9266842" />
<sodipodi:guide
position="19.00729,115.95953"
orientation="1,0"
id="guide99465" />
<sodipodi:guide
position="82.50729,108.02203"
orientation="1,0"
id="guide99538" />
<sodipodi:guide
position="40.173958,142.41786"
orientation="0,-1"
id="guide99808" />
</sodipodi:namedview>
<defs
id="defs2">
<marker
style="overflow:visible"
id="Arrow1Lend"
refX="0"
refY="0"
orient="auto"
inkscape:stockid="Arrow1Lend"
inkscape:isstock="true">
<path
transform="matrix(-0.8,0,0,-0.8,-10,0)"
style="fill:context-stroke;fill-rule:evenodd;stroke:context-stroke;stroke-width:1pt"
d="M 0,0 5,-5 -12.5,0 5,5 Z"
id="path114942" />
</marker>
</defs>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(5.7781248,-9.926684)">
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.88056px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="10.583333"
y="52.916664"
id="text3290"><tspan
sodipodi:role="line"
id="tspan3288"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="10.583333"
y="52.916664" /></text>
<text
xml:space="preserve"
style="font-size:3.88056px;line-height:1.25;font-family:sans-serif;stroke-width:0.264583"
x="13.229167"
y="58.208332"
id="text6956"><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="13.229167"
y="58.208332"
id="tspan11980">reduce(op, xs)</tspan><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="13.229167"
y="63.059032"
id="tspan11982">sum(xs)</tspan><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="13.229167"
y="67.909729"
id="tspan11984">prod(xs)</tspan><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="13.229167"
y="72.760429"
id="tspan11986">all(xs)</tspan><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="13.229167"
y="77.61113"
id="tspan11988">any(xs)</tspan><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="13.229167"
y="82.46183"
id="tspan11990">count(xs)</tspan><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="13.229167"
y="87.312531"
id="tspan11992">maximum(xs)</tspan><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="13.229167"
y="92.163231"
id="tspan11994">minimum(xs)</tspan><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="13.229167"
y="97.013931"
id="tspan11996">extrema(xs)</tspan><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="13.229167"
y="101.86463"
id="tspan51462">issorted(xs)</tspan></text>
<text
xml:space="preserve"
style="font-size:3.88056px;line-height:1.25;font-family:sans-serif;stroke-width:0.264583"
x="76.729164"
y="100.54166"
id="text6956-9"><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="76.729164"
y="100.54166"
id="tspan34943-0">findmax(f, xs)</tspan><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="76.729164"
y="105.39236"
id="tspan34959-4">findmin(f, xs)</tspan><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="76.729164"
y="110.24306"
id="tspan34961-8">argmax(f, xs)</tspan><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="76.729164"
y="115.09376"
id="tspan21733-1">argmin(f, xs)</tspan><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="76.729164"
y="119.94446"
id="tspan21735-7">findfirst(f, xs)</tspan><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="76.729164"
y="124.79516"
id="tspan51462-0">findlast(f, xs)</tspan><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="76.729164"
y="129.64586"
id="tspan87677">findall(f, xs)</tspan></text>
<text
xml:space="preserve"
style="font-size:3.88056px;line-height:1.25;font-family:sans-serif;stroke-width:0.264583"
x="13.229166"
y="119.0625"
id="text6956-9-6"><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="13.229166"
y="119.0625"
id="tspan12060-2-0">accumulate(op, xs)</tspan><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="13.229166"
y="123.9132"
id="tspan49229-2-3">accumulate!(op, ys, xs)</tspan><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="13.229166"
y="128.7639"
id="tspan49231-6-0">cumsum(xs)</tspan><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="13.229166"
y="133.61459"
id="tspan49233-1-4">cumsum!(ys, xs)</tspan><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="13.229166"
y="138.4653"
id="tspan49235-0-4">cumprod(xs)</tspan><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="13.229166"
y="143.31599"
id="tspan49237-6-4">cumprod!(ys)</tspan><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="13.229166"
y="148.1667"
id="tspan51462-0-7">scan!(op, xs)</tspan></text>
<text
xml:space="preserve"
style="font-size:3.88056px;line-height:1.25;font-family:sans-serif;stroke-width:0.264583"
x="76.729164"
y="145.52083"
id="text6956-9-6-5"><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="76.729164"
y="145.52083"
id="tspan12070-9-6-4">collect(xs)</tspan><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="76.729164"
y="150.37152"
id="tspan51458-4-3-1">unique(xs)</tspan><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="76.729164"
y="155.22223"
id="tspan51460-9-1-8">set(xs)</tspan><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="76.729164"
y="160.07292"
id="tspan51462-0-7-5">dict(xs)</tspan></text>
<text
xml:space="preserve"
style="font-size:3.88056px;line-height:1.25;font-family:sans-serif;stroke-width:0.264583"
x="13.229166"
y="21.166666"
id="text6956-0"><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="13.229166"
y="21.166666"
id="tspan7032-6">map(f, xs)</tspan><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="13.229166"
y="26.017366"
id="tspan11974-3">map!(f, ys, xs)</tspan><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="13.229166"
y="30.868065"
id="tspan51462-4">foreach(f, xs)</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.88056px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="71.4375"
y="-37.041672"
id="text3290-3"><tspan
sodipodi:role="line"
id="tspan3288-6"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="71.4375"
y="-37.041672" /></text>
<text
xml:space="preserve"
style="font-size:3.88056px;line-height:1.25;font-family:sans-serif;stroke-width:0.264583"
x="76.729164"
y="21.16666"
id="text6956-7"><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="76.729164"
y="21.16666"
id="tspan12008-8">mapreduce(f, op, xs)</tspan><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="76.729164"
y="26.017361"
id="tspan12010-7">sum(f, xs)</tspan><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="76.729164"
y="30.868061"
id="tspan12012-9">prod(f, xs)</tspan><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="76.729164"
y="35.718761"
id="tspan12014-2">all(f, xs)</tspan><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="76.729164"
y="40.569458"
id="tspan12016-0">any(f, xs)</tspan><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="76.729164"
y="45.420158"
id="tspan12018-2">count(f, xs)</tspan><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="76.729164"
y="50.270859"
id="tspan12020-3">maximum(f, xs)</tspan><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="76.729164"
y="55.121559"
id="tspan12022-7">minimum(f, xs)</tspan><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="76.729164"
y="59.97226"
id="tspan12024-5">extrema(f, xs)</tspan><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="76.729164"
y="64.82296"
id="tspan12026-9">findmax(f, xs)</tspan><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="76.729164"
y="69.67366"
id="tspan12028-2">findmin(f, xs)</tspan><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="76.729164"
y="74.524361"
id="tspan12030-2">argmax(f, xs)</tspan><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="76.729164"
y="79.375061"
id="tspan12070-1">argmin(f, xs)</tspan><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:0.264583"
x="76.729164"
y="84.225761"
id="tspan40080">issorted(xs; by = f)</tspan></text>
<text
xml:space="preserve"
style="font-size:3.88056px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;stroke-width:0.264583"
x="7.9375"
y="15.875"
id="text92439"><tspan
sodipodi:role="line"
id="tspan92437"
style="stroke-width:0.264583"
x="7.9375"
y="15.875">Independent computation</tspan></text>
<text
xml:space="preserve"
style="font-size:3.88056px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;stroke-width:0.264583"
x="7.9375"
y="52.916668"
id="text93289"><tspan
sodipodi:role="line"
id="tspan93287"
style="stroke-width:0.264583"
x="7.9375"
y="52.916668">Simple reductions</tspan></text>
<text
xml:space="preserve"
style="font-size:3.88056px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;stroke-width:0.264583"
x="71.4375"
y="95.25"
id="text95279"><tspan
sodipodi:role="line"
id="tspan95277"
style="stroke-width:0.264583"
x="71.4375"
y="95.25">Search</tspan></text>
<text
xml:space="preserve"
style="font-size:3.88056px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;stroke-width:0.264583"
x="71.4375"
y="140.22917"
id="text96207"><tspan
sodipodi:role="line"
id="tspan96205"
style="stroke-width:0.264583"
x="71.4375"
y="140.22917">Generating collection</tspan></text>
<text
xml:space="preserve"
style="font-size:3.88056px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;stroke-width:0.264583"
x="7.9375"
y="113.77084"
id="text98653"><tspan
sodipodi:role="line"
id="tspan98651"
style="stroke-width:0.264583"
x="7.9375"
y="113.77084">Scan</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
d="M 41.010416,19.84375 H 74.083332"
id="path100069" />
<path
style="fill:none;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 47.624999,56.885416 C 54.239583,56.885417 44.979167,19.84375 59.53125,19.84375"
id="path100071"
sodipodi:nodetypes="cc" />
<path
style="fill:none;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
d="M 48.947917,58.208333 70.114582,91.281249"
id="path100469"
sodipodi:nodetypes="cc" />
<path
style="fill:none;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
d="M 11.90625,19.84375 H -2.6458333 V 153.45833 H 54.239583 l 1.322916,-14.55208 h 14.552083"
id="path100471"
sodipodi:nodetypes="cccccc" />
<path
style="fill:none;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
d="M 47.624999,58.208333 V 108.47917 L 31.75,113.77083"
id="path100473"
sodipodi:nodetypes="ccc" />
<text
xml:space="preserve"
style="font-size:3.175px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;stroke-width:0.264583"
x="31.75"
y="158.75"
id="text105037"><tspan
sodipodi:role="line"
id="tspan105035"
style="stroke-width:0.264583"
x="31.75"
y="158.75">generic output</tspan></text>
<text
xml:space="preserve"
style="font-size:3.175px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;stroke-width:0.264583"
x="-108.47916"
y="52.916668"
id="text107141"
transform="rotate(-90)"><tspan
sodipodi:role="line"
id="tspan107139"
style="stroke-width:0.264583"
x="-108.47916"
y="52.916668">keep intermediates</tspan></text>
<text
xml:space="preserve"
style="font-size:3.175px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;stroke-width:0.264583"
x="85.352013"
y="-11.772407"
id="text111369"
transform="rotate(57.373918)"><tspan
sodipodi:role="line"
id="tspan111367"
style="stroke-width:0.264583"
x="85.352013"
y="-11.772407">index aware</tspan></text>
<text
xml:space="preserve"
style="font-size:3.175px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;stroke-width:0.264583"
x="56.885418"
y="27.78125"
id="text113551"><tspan
sodipodi:role="line"
id="tspan113549"
style="stroke-width:0.264583"
x="56.885418"
y="27.78125">fuse</tspan></text>
</g>
</svg>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment