- まだ定義されていない関数
barを呼び出す関数fooを定義する:
* (defun foo ()
(bar))
; in: defun foo
; (bar)
;
; caught style-warning:
; undefined function common-lisp-user:bar
bar を呼び出す関数 foo を定義する:* (defun foo ()
(bar))
; in: defun foo
; (bar)
;
; caught style-warning:
; undefined function common-lisp-user:bar
| #include <assert.h> | |
| #include <stdint.h> | |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <wchar.h> | |
| #include <Windows.h> | |
| auto main() -> int { | |
| wchar_t buffer[256] = {}; |
| #!/usr/bin/perl | |
| # -*- mode: perl; -*- | |
| use v5.38.2; | |
| use Data::Entropy::Algorithms qw(rand_int choose_r); | |
| use Getopt::Long; | |
| use Path::Class; | |
| use Pod::Usage; | |
| my $amount = rand_int(6) + 1; | |
| my $help = 0; |
| #pragma once | |
| #include <random> | |
| int32_t pick( std::mt19937_64 &engine, int32_t min, int32_t max ) { | |
| std::uniform_int_distribution<> dist( min, max ); | |
| return dist( engine ); | |
| } |
| #include <vector> | |
| #include <iostream> | |
| #include <random> | |
| #include <string> | |
| constexpr auto CAPACITY = 1024; | |
| int main() { | |
| std::random_device seed_generator; | |
| std::mt19937_64 engine{ seed_generator() }; |
| my @katakana-female-names = './katakana-female-names000.tsv'.IO.lines; | |
| my @katakana-male-names = './katakana-male-names000.tsv'.IO.lines; | |
| my @klasses = <戦士 盗賊 僧侶 魔法使い 侍 君主 司教>; | |
| my @sexes = <男 女>; | |
| my @alignment = <善 中立 悪>; | |
| my @races = <人間 ドワーフ エルフ ホブ ノーム>; | |
| my $generate-amount = (6..12).pick; |
| # `pkg-config.list-all.txt` を作成します。 | |
| pkg-config --list-all | sort -u > ./pkg-config.list-all.txt | |
| # おまけで `./digraph` ディレクトリを作るかもしれない。 | |
| mkdir ./digraph |
| User | |
| ``` scheme | |
| (define-syntax dolist | |
| (syntax-rules () | |
| ((_ (it seq result)) | |
| (let loop ((xs seq)) | |
| (if (null? xs) | |
| result | |
| (begin | |
| (let ((it (car xs))) |
| (include "./reiteration.scm") | |
| (dolist (i '(0 1 2 3 4 5 6 7 8 9)) | |
| (display i) | |
| (display " ")) |
| defmodule Example.Sort do | |
| def sort([]), do: [] | |
| def sort([head | tail]), do: insert(head, sort(tail)) | |
| defp insert(elt, lst) do | |
| case lst do | |
| [] -> | |
| [elt] |