This file contains hidden or 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
import os | |
import errno | |
import sys | |
shard_index = sys.argv[1] | |
PATH = os.path.dirname(os.getcwd()) | |
TESTSPATH = os.path.join(PATH,"Example/UITests/") | |
tests = [] | |
shard_tests = "" |
This file contains hidden or 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
import Foundation | |
func Y<In, Out>(_ f :@escaping (@escaping(In) -> Out) -> (In) -> Out) -> (In) -> Out { | |
return { | |
d in f(Y(f))(d) | |
} | |
} | |
let factorial = | |
Y {(f) in | |
{ n in |
This file contains hidden or 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
fun main(args: Array<String>) { | |
if (args.count() == 0) { | |
println("Please input a number") | |
} else { | |
try { | |
val n = args[0].toInt() | |
val factorial = y<Int,Int> {f-> { n-> | |
if (n == 0) 1 | |
else n * f(n - 1) | |
} } |