12 lines
347 B
TypeScript
12 lines
347 B
TypeScript
import { Bit } from "./bit";
|
|
import { emptyWord, wordFromBits } from "./word";
|
|
|
|
function memory(initialValue: Bit[])
|
|
function memory(width: number)
|
|
function memory(valueOrWidth: number | Bit[]) {
|
|
let word = typeof valueOrWidth === 'number' ? emptyWord(valueOrWidth) : wordFromBits(valueOrWidth)
|
|
|
|
function set(word: Word) {
|
|
|
|
}
|
|
} |