Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The error "504 Gateway Time-out" occur in Try Elm("/try") #844

Open
shinjiroy opened this issue May 6, 2020 · 0 comments
Open

The error "504 Gateway Time-out" occur in Try Elm("/try") #844

shinjiroy opened this issue May 6, 2020 · 0 comments

Comments

@shinjiroy
Copy link

I wrote and sent this code in Try Elm(https://elm-lang.org/try).

import Html exposing (Html, text, div, h1, table, thead, tr, th, tbody, td)

main =
  div []
    [
      h1 [] [ text "Lambda Calculus"],
      table [] [
        thead [] [
          tr [] [
            th [] [ text "Input" ],
            th [] [ text "Output" ]
          ]
        ],
        tbody [] [
          outTr "sub C3 C2" (resultChuNum (sub c3 c2))
        ]
      ]
    ]

outTr =
  \fncNam -> \rst ->
    tr [] [
              td [] [ text fncNam ],
              td [] [ text rst ]
          ]

resultBool =
  \b -> 
    (\l -> \m -> \n -> l m n) b "true" "false"

tru = \t -> \f -> t

fls = \t -> \f -> f

and = \b -> \c -> b c fls

or = \b -> \c -> b tru c

not = \b -> b fls tru

pair = \f -> \s -> \b -> b f s

fst = \p -> p tru

snd = \p -> p fls

testPair = pair "first" "second"

c0 = \s -> \z -> z

c1 = \s -> \z -> s z

c2 = \s -> \z -> s (s z)

c3 = \s -> \z -> s (s (s z))

scc = \n -> \s -> \z -> s (n s z)

resultChuNum = \chur -> String.fromInt (chur (\n -> n + 1) 0)

plus = \m -> \n -> m scc n

times = \m -> \n -> m (plus n) c0

pow = \m -> \n -> m n

iszro = \m -> m (\x -> fls) tru

zz = pair c0 c0

ss = \p -> pair (snd p) (plus c1 (snd p))

prd = \m -> fst (m ss zz)

sub = \m -> \n -> n prd m

Then this error occured.

2020y05m06d_203815967

Only function "sub" causes this error.
Other functions don't cause this error.

2020y05m06d_204114599

Environment
Windows 10 Pro
Google Chrome 81.0.4044.129

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant