Compute the partial derivatives of
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scala.collection.immutable.List; | |
abstract class ForkJoin { | |
protected def getList[T]: List[T] | |
def apply[A, B]: (List[A], List[B]) = { | |
(getList[A], getList[B]) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
def echoeval(expr_str): | |
global sys, pprint | |
try: sys | |
except NameError: import sys | |
try: pprint | |
except NameError: from pprint import pprint | |
calling_frame = sys._getframe().f_back | |
print(expr_str, '=', end=' ') |