const Z = (f=> (x=>f(y=>x(x)(y))) (x=>f(y=>x(x)(y))) )
console.log(
Z(
(x) => (
(n) => (
(n==0) ? 1 : n * x(n-1)
)
)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const z=a=>(b=>a(c=>b(b)(c)))(b=>a(c=>b(b)(c))) | |
const r=n=>(m=>z(x=>i=>i==m?[]:[i,x(i+1)]))(n)(0) | |
const map=f=>l=>z(x=>m=>m[1].length==0?[f(m[0]),[]]:[f(m[0]),x(m[1])])(l) | |
const fizzbuzz=x=>map(i=>i%15?i%3?i%5?i:'Buzz':'Fizz':'FizzBuzz')(r(x)) | |
console.log(fizzbuzz(100).flat(1/0)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<!-- Created with Inkscape (http://www.inkscape.org/) --> | |
<svg | |
width="210mm" | |
height="297mm" | |
viewBox="0 0 210 297" | |
version="1.1" | |
id="svg1" | |
xml:space="preserve" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eval$s="require('zlib');FONT=Zlib::Inflate.inflate('eJwlUbFu2zAUf | |
JIJlI2Nmik8aBAKikBqwUvcrUMgSAoQNJmS9gfcregXBJ1oWkAtuUBhZ2mWwNCQwh | |
469AMCZvOQL+ikDgU6Fv2CHlUOhyN57949UpNbXBqSNLhIwQdvfiUXKf/wce+PHu9 | |
y8WUSrIrRch1ETskiJmQqZMawVV9Hkkh+nsvWZZwT9XVL6a0mngtNYfX+e2n5xPDI | |
hvOIHzeJmPqlZS9OE5EmM2tK28v7qrQJ9Bn0Q3Cg2dcwCSbOCq1ZxNGXOk1CBFJE5 | |
NxIh/Pn3+D/Or6r5FF1qBao5bK0L1dxfaUT05ezxqGBc7cuG1Ud1pUMpcvzRGRsqd | |
XqU7ySOIBS/djiVi1Gt9BUcV1aeLa18Xa5BofymXnkd23iCrRqNQ7PwUfbTarKfAC | |
H6gC3bqJZE2ZMZJamPuMUouM+0v5/L8I4bigsz96UjTQP9cKSt0N+//EGacHvprZ3 | |
iqTQ/K4vh05TSe65/Izu2dMTac7GdRq0E1HnbFtJ8p0GtchGnV39l5O3uX0ntf+wN | |
vDZhV0rjgvxypIf19drh+caiPzkH7h4OLkcUucn/quXcZFa3s4biLTAv3h7BTL/A5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> | |
</head> | |
<body> | |
<!-- 入力 --> | |
<label for="sincho">身長 (50-200 cm):</label> | |
<input type="number" id="sincho" min="50" max="200"> | |
<br> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const array1=[1,2,3,4,5,6] | |
const array2=array1.a||(z=>(F=>l=>z(X=>m=>m[1].length==0?[F(m[0]),[]]:[F(m[0]),X(m[1])])(l))(i=>i%2?[i,i,i]:[i,i])(z(a=>l=>l.length==1?[l[0],[]]:[l[0],a(l.slice(1))])(array1)))(A=>(B=>A(c=>B(B)(c)))(B=>A(c=>B(B)(c)))).flat(1/0) | |
console.log(array2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# アナログ時計の形に整形された 自分自身と等しいプログラムを出力するプログラム | |
eval$s=%w'a=Array;s= | |
34;b=a.new(s){a.new(s,0)};(0.. | |
.s).each{|x|(0...s).each{|y|xx=x-s/2.1 | |
;yy=y-s/2.1;i=xx**2+yy**2;b[y][x]=(s/2.8)* | |
*2<i&&i<(s/2)**2?1:((i<(s/20)**2)?1:0)}};l=Math; | |
t=Time.new;h,m=( t.hour%12+t.min* | |
0.00872664625) *0.5235,t.min* | |
0.1047;c=->(p, z,u,d,e){g=d | |
-z;i=(g>=0)? 1:-1;o=e-u;j |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! s:State(bufid) abort | |
let l:counter = 0 | |
let l:bufid = a:bufid | |
function! Inc() closure | |
let l:counter += 1 | |
call Flash() | |
endfunction | |
function! Dec() closure |
let Ref = function({val -> execute("echo val")})
call Ref("hoge") " => hoge
vim9script
var Ref = function((val) => execute("echo val"))
Ref("hoge") # => E121: Undefined variable: val
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt | |
index 72e2cf13f..833a39a11 100644 | |
--- a/runtime/doc/builtin.txt | |
+++ b/runtime/doc/builtin.txt | |
@@ -10445,6 +10445,7 @@ xpm Compiled with pixmap support. | |
xpm_w32 Compiled with pixmap support for Win32. (Only for | |
backward compatibility. Use "xpm" instead.) | |
xsmp Compiled with X session management support. | |
+wsl Vim is running on WSL (Windows Subsystem for Linux). | |
xsmp_interact Compiled with interactive X session management support. |
NewerOlder