In this paper, a fundamentally new approach to computer-aided design and simulation of electrical circuits based on a use of lambda-calculus for circuit device model representation and dynamic sizeable containers for sparse matrix simulation indexation indices is presented. This approach differs from traditional procedure where the entire simulation was performed over the matrix or matrix system assembled by modified nodal analysis (MNA). Turning device model definitions using lambda-calculus to functionals allowed to reduce an effort required for their specification and opened new possibilities for simulation evaluation. Considering MNA matrix as second-order tensor system holding the functional definition of original sparse matrix entries allows to imagine these dependencies as chains with respect to a model definition and global dependencies between their defining inner functions. In this particular case, standard indexing methods would be a waste of memory during a computation, this problem occurs when huge sparse matrices enter the simulation. Therefore, new optimized indexing technique for non-zero matrix entries and variable size container types for those indexation vectors is proposed.