Skip to content

Commit

Permalink
remove trailing whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
bakkdoor committed Oct 17, 2013
1 parent 0b186f2 commit 9735464
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
12 changes: 6 additions & 6 deletions lib/array.fy
Expand Up @@ -4,28 +4,28 @@ class Array {
Arrays are dynamically resizable containers with a constant-time
index-based access to members.
"""

include: Fancy Enumerable

# Late-documentation of Rbx-methods.
# lib/rbx/array.fy#L66
method_documentation: <[
'at: => """
@idx Index for value to retrieve.
@return Value with the given index (if available), or @nil.
Returns the element in the @Array@ at a given index.
""",

'[]: => """
@idx Index to set a value for.
@obj Value (object) to be set at the given index.
@return @obj.
Inserts a given object at a given index (position) in the Array.
"""
]>

def Array new: size {
"""
@size Initial size of the @Array@ to be created (values default to @nil).
Expand Down
8 changes: 4 additions & 4 deletions lib/object.fy
Expand Up @@ -3,7 +3,7 @@ class Object {
Root class of Fancy's class hierarchy.
All classes inherit from Object.
"""

# Late-documentation of Rbx-methods.
# lib/rbx/object.fy#L82
method_documentation: <[
Expand All @@ -13,16 +13,16 @@ class Object {
Indicates, if an object is an instance of a given Class.
""",

'kind_of?: => """
@class @Class@ to check for if @self is an instance of.
@return @true if @self is an instance of @class, @false otherwise.
Same as Object#is_a?:
Indicates, if an object is an instance of a given Class.
"""
]>

def ++ other {
"""
@other Other object to concatenate its @String value with.
Expand Down
4 changes: 2 additions & 2 deletions lib/rbx/array.fy
Expand Up @@ -62,11 +62,11 @@ class Array {
}
nil
}

# Late-documented in lib/array.fy#L10
alias_method: 'at: for: 'at
alias_method: '[]: for_ruby: '[]=

alias_method: 'at:put: for: '[]:
alias_method('at_put, '[]=)

Expand Down
6 changes: 3 additions & 3 deletions lib/rbx/class.fy
Expand Up @@ -264,7 +264,7 @@ class Class {
case _ -> alias_method(ruby_method_name, method_name message_name)
}
}

def method_documentation: documentation_hash {
"""
@documentation_hash @Hash@ of method name to documentation string.
Expand All @@ -286,12 +286,12 @@ class Class {
instance_method: method_name . documentation: doc
}
}

def method: method_name doc: doc_string {
"""
@method_name Name of method to set documentation string for.
@doc Documentation string.
Sets the documentation string @doc for the method @method_name.
"""
instance_method: method_name . documentation: doc_string
Expand Down
6 changes: 3 additions & 3 deletions tools/benchmarks/fasta2.fy
Expand Up @@ -90,10 +90,10 @@ def fasta_repeat: n seq: seq {

def fasta_random: count genelist: list {
_stdout = *stdout*

#buff = Array new: WIDTH
make_cumulative: list

while: { count > 0 } do: {
buff = StringIO new
line = WIDTH min: count
Expand All @@ -102,7 +102,7 @@ def fasta_random: count genelist: list {
while: { pos < line } do: {
Last = (Last * A + C) % M
r = (Last to_f) / M

i = 0
# Linear search
while: { (list[i] p) < r } do: {
Expand Down

0 comments on commit 9735464

Please sign in to comment.