Skip to content

Commit

Permalink
Add infix operator aliases for MusicObject#seq and #par.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Voorhis committed Jul 7, 2008
1 parent a4a84d0 commit c1f296e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/music.rb
Expand Up @@ -97,11 +97,13 @@ def duration; 0.0 end
def seq(other)
Seq.new(self, other)
end
alias :& :seq

# Parallel (concurrent) composition.
def par(other)
Par.new(self, other)
end
alias :| :par

def each
yield self
Expand Down

0 comments on commit c1f296e

Please sign in to comment.