core.branch-latest-snapshot
- description
- The latest snapshot of the branch of the project from index. found is the latest before index; for the same time the earlier in the list stays
- type
Fn( commits: List<@core.snapshot-summary>, project_name: String, branch: String, index: Number, found: Union{#none, #some(@core.snapshot-summary)} ) -> Union{#none, #some(@core.snapshot-summary)}
- expression
fn(commits$0, project_name$1, branch$2, index$3, found$4) => match @core.list-get(list: $0, index: $3) { #none(_) => $4, #some(item$1007) => let commit$5 = $1007; @core.branch-latest-snapshot( commits: $0, project_name: $1, branch: $2, index: @core.plus(left: $3, right: 1), found: match @core.and( left: @core.equal(left: $5.project_name, right: $1), right: @core.equal(left: $5.branch, right: $2) ) { true => match $4 { #none(_) => #some($5), #some(f$6) => match @core.less-than(left: $6.time, right: $5.time) { true => #some($5), false => $4 } }, false => $4 } ) }
- visibility
- public
core.branch-latest-snapshot (project definy, branch main, snapshot CfIAXM725tR74SWd4aoTUz4-JJQfqnllblZbQ2Sv204) id: 7JFHeGuvY2zgeIUwNJAxsT-1-RIipsdW-_JRsIaKGDs content hash: SU3qELEtwzXnbuCe8hY5LQLduLh5ZCVo4-QZSVUwS3U