Is 'concepts' is being polished/refurbished as a major feature in v2 - I hope 
it is.

I am assuming the code below is a known problem; compilation is slow and 
nothing is produced as output. This is on devel 1.9.5.
    
    
    type
      Distribution = concept
        proc sample(d: Self): float
      
      Die[float] = object
        sides: int
    
    func sample(d: Distribution): float =
      rand(1..d.sides)
    
    
    let D = Die[float](sides: 6)
    echo sample D
    
    
    Run

nim

Reply via email to