This file contains hidden or 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
// This is my approach to creating callable objects | |
// that correctly reference their object members, | |
// without messing with prototypes. | |
// A Class that extends Function so we can create | |
// objects that also behave like functions, i.e. callable objects. | |
class ExFunc extends Function { | |
constructor() { | |
// Here we create a dynamic function with `super`, | |
// which calls the constructor of the parent class, `Function`. |
This file contains hidden or 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
from turtle import Screen, Turtle, mode, Vec2D | |
win = Screen() | |
win.bgcolor('black') | |
mode('logo') | |
tur = Turtle() | |
tur.shape('arrow') | |
tur.shapesize(0.5, 0.5, 0.5) | |
tur.color('lime', 'green') |
NewerOlder