Code: Select all
F1:: {
Loop {
(A_Index >= 5) ? break : ""
}
MsgBox("We got out!")
return
}
; ------ ;
F2:: {
Loop {
(A_Index >= 5) ? return : ""
}
}
Code: Select all
F1:: {
Loop {
(A_Index >= 5) ? break : ""
}
MsgBox("We got out!")
return
}
; ------ ;
F2:: {
Loop {
(A_Index >= 5) ? return : ""
}
}
Code: Select all
#Requires AutoHotkey v2.0
; Define a Z-combinator extended to accept an additional argument to evaluate.
Z := f => (x => f(v => w => x(x)(v)(w)))(x => f(v => w => x(x)(v)(w)))
; The user defined loop statement, which I've called "L" for Loop.
L := g => y => z => (y > 0 ? (z(), g(y - 1)(z)) : 0)
; The single line loop statement is defined as Z(L)( number of loops ) ( The function you'd like to execute)
Z(L)(3)( MsgBox.Bind("Hello world!") )
Code: Select all
#Requires AutoHotkey v2.0
; Show Hello World 3 times!
(f=>(x=>f(v=>w=>x(x)(v)(w)))(x=>f(v=>w=>x(x)(v)(w))))(g=>y=>z=>(y>0?(z(),g(y-1)(z)):0))(3)( MsgBox.Bind("Hello world!") )
wow!!!!!!!!!!! when you need 10 fat arrows in that one line, I guess you're right!.It's important to remember how to build things as dictated by the very structure of the world itself, with complete disregard for any appeals to tradition and authority, i.e. the "accepted" way of doing things.
Users browsing this forum: No registered users and 28 guests