Update README.md

This commit is contained in:
Joey 2020-09-16 10:12:16 -06:00 • committed by GitHub
commit 4c1f858cd7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,7 +12,8 @@ Extensions so far include:
Usage: Usage:
```nim ```nim
import extensions/oop import extensions / oop
class BaseObject: # inherits from RootObj class BaseObject: # inherits from RootObj
# attributes/properties # attributes/properties
var var
@ -44,7 +45,7 @@ Extensions so far include:
```nim ```nim
import os import os
import extensions/enumerate import extensions / enumerate
for i, line in enumerate(lines, "file.txt"): for i, line in enumerate(lines, "file.txt"):
echo i, " ", line echo i, " ", line
@ -58,7 +59,7 @@ Extensions so far include:
These printing procs are useful for printing objects and their types. These printing procs are useful for printing objects and their types.
```nim ```nim
import objprint import extensions / objprint
type Unit = ref object type Unit = ref object
name: string name: string
@ -68,7 +69,7 @@ echo Unit(name: "Non-ref")[]
echo (str: "value") echo (str: "value")
# Prints: # Prints:
#. ref Unit(name: "Ref") # ref Unit(name: "Ref")
#. Unit(name: "Non-ref") # Unit(name: "Non-ref")
#. tuple[str: string](str: "value") # tuple[str: string](str: "value")
``` ```