Skip to content

Conversation

@MikePuzanov
Copy link
Owner

No description provided.

Copy link

@DedSec256 DedSec256 left a comment

Choose a reason for hiding this comment

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

Есть небольшое замечание.

let funcToList'2 x : int list -> int list = List.map ((*)x)

// убрали переменную
let funcToList'3() : int -> int list -> int list = List.map << (*)

Choose a reason for hiding this comment

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

в point-free записи, обычно, не должны присутствовать аргументы вообще, здесь можно убрать ()

Suggested change
let funcToList'3() : int -> int list -> int list = List.map << (*)
let funcToList'3 = List.map << (*)

[<Test>]
let checkEqualTest () =
let check x l =
funcToList x l = funcToList'3 () x l

Choose a reason for hiding this comment

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

внезапно итоговая funcToList'3 принимает больше аргументов, чем исходная. Нехорошо!

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.

3 participants