In addition to having implicit arguments, Agda lets you omit the value of an explicit argument and replace it with a metavariable, denoted by the _
character, whose value is then determined through the same procedure as implicit resolution.
Does Idris have a similar feature, or are implicit arguments the only way of introducing metavariables into programs?
You can use _
in Idris as well.
import Data.Vect
foo : (n : Nat) -> Vect n a -> Vect n a
foo n xs = xs
bar : Vect 3 Nat
bar = foo _ [1, 2, 3] -- works
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With