Hi,

I'm new to Julia, so forgive me if I've missed the documentation for this 
somewhere. I'm curious how to express the following type relationship 
properly in Julia:

function foo{T, n} ( 
  x::Array{T, n},
  y::Array{T, n+1} ) 
  ### stuff
end

Basically, I want to specify that foo() takes two Arrays, and the second 
argument always has one more dimension than the first. Is there a way to 
express this in the types, or do I need to check it at runtime with 
something like "ndims(x) == ndims(y) - 1"?


Thanks,
Dylan

Reply via email to