From 22e23eda5df4d1cff13dacfbe3cd2aec4a3e26e4 Mon Sep 17 00:00:00 2001 From: StunxFS <56417208+StunxFS@users.noreply.github.com> Date: Fri, 5 Feb 2021 11:51:17 -0400 Subject: [PATCH] doc: use '?' in optional functions (#8583) --- doc/docs.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/doc/docs.md b/doc/docs.md index 0ed2267f6c..dcca8d8e32 100644 --- a/doc/docs.md +++ b/doc/docs.md @@ -3800,17 +3800,19 @@ module global (so that you can use `ls()` instead of `os.ls()`, for example). // so it can be run just by specifying the path to the file // once it's made executable using `chmod +x`. -rm('build/*') +rm('build/*')? // Same as: -for file in ls('build/') { - rm(file) +files_build := ls('build/')? +for file in files_build { + rm(file)? } -mv('*.v', 'build/') +mv('*.v', 'build/')? // Same as: -for file in ls('.') { +files := ls('.')? +for file in files { if file.ends_with('.v') { - mv(file, 'build/') + mv(file, 'build/')? } } ```