mirror of
https://github.com/azur1s/bobbylisp.git
synced 2024-10-16 02:37:40 -05:00
22 lines
350 B
C++
22 lines
350 B
C++
|
#pragma once
|
||
|
#include <iostream>
|
||
|
|
||
|
template<typename T>
|
||
|
/**
|
||
|
* @brief Read the value from stdin and return it.
|
||
|
*/
|
||
|
T hazure_read() {
|
||
|
T x;
|
||
|
std::cin >> x;
|
||
|
return x;
|
||
|
}
|
||
|
|
||
|
template<typename T>
|
||
|
/**
|
||
|
* @brief Prints the value of the variable to the stdout.
|
||
|
*
|
||
|
* @param value The value to print.
|
||
|
*/
|
||
|
void hazure_write(T x) {
|
||
|
std::cout << x;
|
||
|
}
|