I definitely can use a compile-time known function as static parameter:

[https://play.nim-lang.org/#ix=1LCk](https://play.nim-lang.org/#ix=1LCk)
    
    
    type
      BinaryTree[V; compare: static[proc(a, b: int): bool]] = object
    
    var tree: BinaryTree[int, proc(a, b: int): bool = a < b]
    echo tree.compare(20, 30);
    
    
    Run

Reply via email to