Agda: std-lib: List: all but last element with snoc

后端 未结 0 1588
抹茶落季
抹茶落季 2020-11-30 12:21

I defined allButLast this way:

allButLast : ∀ {a} {A : Set a} → List A → List A
allButLast l.[] = l.[]
allButLast list = l.reverse (tail\' (l.rev         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题