Created
October 6, 2016 01:36
-
-
Save esehara/2e32a6cf85dc261216d1f8efe9c0bdf4 to your computer and use it in GitHub Desktop.
ふぃしゅっしゅ数 Ver 1.0 Haskell Ver
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
ack_like 0 n f = f n | |
ack_like m 0 f = ack_like (m - 1) 1 f | |
ack_like m n f = ack_like (m - 1) (ack_like m (n - 1) f) f | |
s_func_conv f = \x -> ack_like x x f | |
s_conv (m, f) = ((g m), g) | |
where | |
g = s_func_conv f | |
ss_s2_conv s = \(m, f) -> (iterate s (m, f)) !! f(m) | |
ss_conv (m, f, s) = (x, y, ss_s2) | |
where | |
ss_s2 = ss_s2_conv s | |
(x, y) = ss_s2 (m, f) | |
main = | |
putStrLn $ show $ result | |
where | |
(result, _, _) = iterate ss_conv (3, \x -> x + 1, \pair -> s_conv pair) !! 63 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment