         case .t:
             return "T"
         }
+    }
+
+    var bigIntValue: BigInt {
+        return BigInt(integerLiteral: Int64(self.rawValue))
+    }
+    
+    public static let componentCount: BigInt = 4
+    
+    internal static var all: [Nucleotide] {
+        return [ .a, .c, .g, .t ]
+    }
+    
+    public static var random: Nucleotide {
+        return Nucleotide.all[Int(arc4random()) % Int(componentCount)]
     }
 
     public init?(unit: CharConvertible) {

//

import Foundation

public typealias Byte = UInt8


        return nil
    }

    public static prefix func ! (nucleotide: Nucleotide) -> Nucleotide {
        switch nucleotide {
        case .a:
            return .t
