See I was going to do that but it felt like it was a bad faith argument. The 
following is a more good faith argument.
    
    
    import traitor #https://github.com/beef331/traitor/tree/master
    type
      Unit = concept
        proc act(_: Self)
      Marine = object
      Tank = object
    
    implTraits Unit:
      proc act(marine: Marine) = echo "It's Jimmy Laynor"
      proc act(tank: Tank) = echo "It's Sgt.Hammer"
    setupTraits Unit
    
    var a = [Marine().toImpl Unit, Tank()]
    for x in a:
      x.act()
    
    
    Run

Reply via email to