'use strict'; /* sense structure: * { * size: number * read: function(lattice, agent) -> number[size] * } */ export function sense_read(lattice, agent, sense) { const result = sense.read(lattice, agent); if (result.length !== sense.size) { throw new Error(`Expected result of size ${sense.size}, but got ${result.length} instead.`); } return sense.read(lattice, agent); }