jroesch commented on issue #6489:
URL: https://github.com/apache/incubator-tvm/issues/6489#issuecomment-693176922
This also type checks:
```
/*
* Reverses a list.
*/
def @rev[A](%xs: List[A]) -> List[A] {
@foldl(@flip(fn (%h: A, %t: List[A]) { Cons(%h, %t) }), Nil, %xs)
}
```
This one doesn't type check.
```
/*
* Reverses a list.
*/
def @rev[A](%xs: List[A]) -> List[A] {
@foldl(@flip(Cons), Nil, %xs)
}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]