Let's say I have an untyped implementation of the Y combinator in Racket.
#lang racket
(define Y
((λ (f)
(f f))
(λ (z)
(λ (f)
(f (λ (x) (((z z) f) x)))))))
(define factorial
(Y (λ (recursive-factorial)
(λ (x)
(if (<= x 0)
1
(* x (recursive-factorial (- x 1))))))))
(factorial 5)
How do I translate that into typed/racket?
N.B. I think this is not the cannonical way of writing the Y combinator, but it should be equivalent.