lib/gen-dot.js
function handle_parallel(elem, names) {
		var phead = hash_name_get({name : 'parallel_head'}, names);
		var ptail = hash_name_get({name : 'parallel_tail'}, names);
		var node;
		var builder = [];

		for (var i = 0; i < elem.fns.length; ++i) {
			node = _dot_inner(elem.fns[i].fn, false, names);
			Array.prototype.push.apply(builder, node[0]);
			builder.push(phead+' -> '+node[1]+';');
			builder.push(node[2]+' -> '+ptail+';');
		}

		builder.push(phead+' [shape=house];');
		builder.push(ptail+' [shape=invhouse];');
		return [builder, phead, ptail];
	}
function handle_parallel(elem, names) {
		var phead = hash_name_get({name : 'parallel_head'}, names);
		var ptail = hash_name_get({name : 'parallel_tail'}, names);
		var node;
		var builder = [];

		for (var i = 0; i < elem.fns.length; ++i) {
			node = _dot_inner(elem.fns[i].fn, false, names);
			Array.prototype.push.apply(builder, node[0]);
			builder.push(phead+' -> '+node[1]+';');
			builder.push(node[2]+' -> '+ptail+';');
		}

		builder.push(phead+' [shape=house];');
		builder.push(ptail+' [shape=invhouse];');
		return [builder, phead, ptail];
	}
function handle_parallel ( elem , names ) { var phead = hash_name_get ( { name : 'parallel_head' } , names ) ; var ptail = hash_name_get ( { name : 'parallel_tail' } , names ) ; var node ; var builder = [ ] ; for ( var i = 0 ; i < elem . fns . length ; ++ i ) { node = _dot_inner ( elem . fns [ i ] . fn , false , names ) ; Array . prototype . push . apply ( builder , node [ 0 ] ) ; builder . push ( phead + ' -> ' + node [ 1 ] + ';' ) ; builder . push ( node [ 2 ] + ' -> ' + ptail + ';' ) ; } builder . push ( phead + ' [shape=house];' ) ; builder . push ( ptail + ' [shape=invhouse];' ) ; return [ builder , phead , ptail ] ; }
Handle a parallel chain, which inserts head and footer nodes around
the functions in the middle
@param elem The parallel chain to describe in DOT
@param names The hash table of functions and their names
@return Standard triple of [strings, first element, last element]
Handle a parallel chain which inserts head and footer nodes around the functions in the middle