Skip to content

Conversation

@vologin-dmitry
Copy link
Owner

No description provided.

Copy link

@yurii-litvinov yurii-litvinov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

В целом всё правильно, зачтена

| Application (left, right) -> isFree left variable || isFree right variable

/// Замена переменной в выражении
let rec substitution oldVariable newVariable expression =

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

newVariable --- не лучшее название для подставляемого вместо переменной терма. Может показаться, что он может быть только переменной

|> betaReduction
|> should equal (Application(Variable('x'), Variable('y')))

// (λx.x y)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Вообще, выражение за лямбдой --- это термы справа до скобки, так что тут имелось в виду (λx.x) y. В тестах ниже тоже. Это запутывает

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

Successfully merging this pull request may close these issues.

2 participants