Skip to content

Additional task #1. Filimonov Igor#14

Open
IgorFilimonov wants to merge 1 commit into
masterfrom
addtask1
Open

Additional task #1. Filimonov Igor#14
IgorFilimonov wants to merge 1 commit into
masterfrom
addtask1

Conversation

@IgorFilimonov

Copy link
Copy Markdown
Owner

No description provided.

@yurii-litvinov yurii-litvinov left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Тут очевидно, что надо поправить, так что зачтена

Comment on lines +3 to +6
let getTail l =
match l with
| [] -> []
| _ -> List.tail l

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

А зачем это? В условии просили сам List.tail, так что формально Вы не ту задачу решали.


let startingFunc g l = List.map g (getTail l)
let func1 g = getTail >> List.map g
let func2 g = (>>) (List.map g) getTail

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Что-то тут функции местами поменялись. Композиция не коммутативна.

let startingFunc g l = List.map g (getTail l)
let func1 g = getTail >> List.map g
let func2 g = (>>) (List.map g) getTail
let func3: (int -> int) -> 'a list -> 'b list = ((>>) getTail) << List.map

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

А тут снова поменялись, поэтому ответ правильный

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