Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
17
Task/Forward-difference/AutoHotkey/forward-difference.ahk
Normal file
17
Task/Forward-difference/AutoHotkey/forward-difference.ahk
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
MsgBox % diff("2,3,4,3",1)
|
||||
MsgBox % diff("2,3,4,3",2)
|
||||
MsgBox % diff("2,3,4,3",3)
|
||||
MsgBox % diff("2,3,4,3",4)
|
||||
|
||||
diff(list,ord) { ; high order forward differences of a list
|
||||
Loop %ord% {
|
||||
L =
|
||||
Loop Parse, list, `, %A_Space%%A_Tab%
|
||||
If (A_Index=1)
|
||||
p := A_LoopField
|
||||
Else
|
||||
L .= "," A_LoopField-p, p := A_LoopField
|
||||
list := SubStr(L,2)
|
||||
}
|
||||
Return list
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue